.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #222;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border-top: 5px solid blueviolet;
  animation: slideIn 0.4s ease-out;
}

.modal-content h5 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  font-weight: bold;
  text-shadow: 2px 2px 5px black;
  text-align: center;
}

.modal-content video {
  width: 100%;
  height: 250px;
  margin-bottom: 15px; 
}

#introduction-modal .tutorial-content {
  max-height: 450px;
  overflow-y: auto;
  text-align: left;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#introduction-modal .tutorial-content::-webkit-scrollbar {
  display: none;
}

.modal-content h2 {
  margin-top: 0;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  border-bottom: 1px solid #444;
  padding-bottom: 15px;
  margin-bottom: 10px;
}

.modal-subtitle {
  color: #bbb;
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.5rem;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #555;
}

.achievements-content {
  max-width: 700px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.achievement-card-v2 {
  background-color: #333;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.achievement-card-v2:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

.achievement-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 auto 15px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
}

.achievement-icon i {
  font-size: 1.6rem;
}

.achievement-title-v2 {
  display: block;
  font-size: 1rem;
  color: #eee;
  margin-bottom: 5px;
  font-weight: 600;
}

.achievement-value-v2 {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: blueviolet;
  margin-bottom: 3px;
  font-family: 'Orbitron', sans-serif;
}

.grand-slam-v2 .achievement-value-v2 {
  color: #ffd700;
}

.achievement-label-v2 {
  font-size: 0.8rem;
  color: #aaa;
}

.nft-modal {
  max-width: 750px;
}

.nft-tabs {
  display: flex;
  border-bottom: 1px solid #444;
  margin-bottom: 25px;
}

.nft-tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 1rem;
  color: #aaa;
  transition: color 0.2s, border-color 0.2s;
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nft-tab-btn:hover {
  color: #fff;
}

.nft-tab-btn.active {
  color: blueviolet;
  border-bottom-color: blueviolet;
  font-weight: 600;
}

.nft-tab-content {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

.nft-tab-content.active {
  display: block;
}

.nft-reward-card-v2 {
  background-color: #333;
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
  border-left: 5px solid #555;
  transition: box-shadow 0.2s ease;
}

.nft-reward-card-v2:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.nft-reward-card-v2.marco {
  border-left-color: blueviolet;
}

.nft-reward-card-v2.gs {
  border-left-color: #ffd700;
}

.nft-reward-card-v2.ref {
  border-left-color: #c0c0c0;
}

.nft-card-header {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nft-title-v2 {
  font-weight: bold;
  font-size: 1.2rem;
  color: #fff;
}

.nft-type {
  font-size: 0.8rem;
  background-color: #555;
  color: #ddd;
  padding: 3px 8px;
  border-radius: 12px;
}

.nft-reward-card-v2.gs .nft-type {
  background-color: #ffd700;
  color: #333;
}

.nft-reward-card-v2.ref .nft-type {
  background-color: #eee;
  color: #333;
}

.nft-card-body {
  padding: 15px;
}

.nft-requirement-v2 {
  font-size: 0.9rem;
  color: #bbb;
  margin-bottom: 15px;
}

.nft-progress-v2 {
  font-size: 0.95rem;
  color: #eee;
  margin-bottom: 10px;
  display: block;
}

.progress-bar-container {
  background-color: #555;
  border-radius: 5px;
  height: 10px;
  margin-bottom: 5px;
  overflow: hidden;
}

.progress-bar {
  background-color: blueviolet;
  height: 100%;
  width: 0%;
  border-radius: 5px;
  transition: width 0.5s ease-out;
}

.winner-status {
  display: block;
  font-size: 0.9rem;
  margin-top: 5px;
  font-weight: bold;
}

.winner-status.checking {
  color: #aaa;
}

.winner-status.winner {
  color: #4ade80;
}

.winner-status.not-winner {
  color: #aaa;
}

.nft-card-footer {
  padding: 10px 15px;
  background-color: rgba(0, 0, 0, 0.1);
  text-align: right;
}

.btn-claim {
  background: linear-gradient(to right, #00b09b, #96c93d);
  color: #fff;
  padding: 10px 20px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-claim:hover {
  opacity: 0.9;
}

.claimed-status-v2 {
  color: #4ade80;
  font-weight: bold;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.claimed-status-v2 i {
  font-size: 1.2rem;
}

.rankings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid #444;
  padding-bottom: 10px;
}

.rankings-header h4 {
  margin: 0;
  color: #eee;
}

.btn-refresh {
  padding: 5px 10px;
  font-size: 0.9rem;
}

.ranking-subtitle {
  color: #bbb;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.rankings-container-v2 {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

@media (min-width: 600px) {

  .rankings-container-v2 {
    flex-direction: row;
    justify-content: space-between;
  }

  .ranking-column-v2 {
    width: 48%;
  }
}

.ranking-column-v2 h5 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #eee;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
  font-size: 1.1rem;
}

.ranking-column-v2 ul {
  list-style: none;
  padding: 0;
  max-height: 350px;
  overflow-y: auto;
  background-color: #2c2c2c;
  border-radius: 8px;
  padding: 10px;
}

.ranking-column-v2 li {
  background-color: #383838;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 5px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.ranking-column-v2 li:hover {
  background-color: #444;
}

.ranking-column-v2 li span:first-child {
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.ranking-score-v2 {
  font-weight: bold;
  color: #4facfe;
  font-size: 1.1rem;
  font-family: 'Orbitron', sans-serif;
}

.spinner-small {
  border: 2px solid #555;
  border-top: 2px solid #ddd;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 5px;
}

.admin-panel-v2 {
  background-color: #2c2c2c;
  padding: 20px;
  border-radius: 8px;
  margin-top: 25px;
  border-top: 3px solid #ff5f6d;
}

.admin-panel-v2 h4 {
  margin-top: 0;
  color: #eee;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-panel-v2 input[type="text"],
.admin-panel-v2 textarea {
  width: calc(100% - 20px);
  margin-bottom: 10px;
  padding: 10px;
  background-color: #444;
  border: 1px solid #555;
  color: #fff;
  border-radius: 5px;
  font-size: 0.9rem;
}

.admin-panel-v2 textarea {
  height: 70px;
  resize: vertical;
}

.admin-panel-v2 button {
  margin-right: 10px;
  margin-bottom: 10px;
  padding: 8px 15px;
}

.admin-panel-v2 hr {
  border: none;
  border-top: 1px solid #444;
  margin: 20px 0;
}

@keyframes slideIn {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --- Estilos do Modal da Galeria (ATUALIZADO) --- */

.gallery-content {
  width: 90%;
  max-width: 600px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.gallery-content .modal-close-btn {
  z-index: 20;
  position: absolute;
  top: 10px;
  right: 15px;
}

#gallery-canvas-container {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #111;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

#gallery-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#gallery-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.spinner-large {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.gallery-info {
  text-align: center;
  margin-top: 1rem;
  min-height: 60px;
}

.gallery-info h3 {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  margin-bottom: 0.25rem;
}

.gallery-info p {
  font-size: 0.9rem;
  color: #ccc;
  margin: 0;
}

.gallery-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.gallery-nav-btn {
  background-color: #333;
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s;
  flex-basis: 120px;
  text-align: center;
}

.gallery-nav-btn:hover {
  background-color: #555;
}

.gallery-category-selector {
  position: relative;
  z-index: 10;
}

.gallery-category-btn {
  background-color: #222;
  color: white;
  border: 1px solid #555;
  padding: 0.75rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s;
}

.gallery-category-btn:hover {
  background-color: #4facfe;
  border-color: #4facfe;
}

#gallery-category-list {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #2a2a2a;
  border: 1px solid #555;
  border-radius: 5px;
  list-style: none;
  padding: 0;
  margin: 0 0 0.25rem 0;
  max-height: 200px;
  overflow-y: auto;
  width: max-content;
}

#gallery-category-list li {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  white-space: nowrap;
}

#gallery-category-list li:hover {
  background-color: #4facfe;
}

#gallery-category-list.hidden {
  display: none;
}

#introduction-modal .tutorial-content::-webkit-scrollbar {
  display: none;
}

#introduction-modal .tutorial-content {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

@media (max-width: 768px) {
  .modal-content {
    padding: 25px;
  }

  .achievements-grid {
    gap: 15px;
  }

  .nft-tabs {
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .nft-tabs::-webkit-scrollbar {
    display: none;
  }

  .nft-tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .gallery-navigation {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .gallery-nav-btn {
    flex-basis: 100px;
    padding: 0.6rem 0.8rem;
  }

  .gallery-category-selector {
    order: -1;
    width: 100%;
    text-align: center;
  }

  #gallery-category-list {
    width: 90%;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 20px 15px;
    max-height: 95vh;
  }

  .modal-content h2 {
    font-size: 1.3rem;
    padding-bottom: 10px;
  }

  .modal-subtitle {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .achievement-card-v2 {
    padding: 15px;
  }

  .achievement-value-v2 {
    font-size: 1.7rem;
  }

  .achievement-title-v2 {
    font-size: 0.9rem;
  }

  .nft-title-v2 {
    font-size: 1.05rem;
  }

  .nft-requirement-v2 {
    font-size: 0.85rem;
  }

  .nft-card-body {
    padding: 12px;
  }

  .nft-card-footer {
    padding: 10px 12px;
  }

  .btn-claim {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .claimed-status-v2 {
    font-size: 0.9rem;
  }

  .ranking-column-v2 li {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .ranking-score-v2 {
    font-size: 0.95rem;
  }

  .gallery-nav-btn {
    flex-basis: 45%;
    padding: 0.7rem;
  }

  .gallery-info h3 {
    font-size: 1.1rem;
  }

  .gallery-info p {
    font-size: 0.85rem;
  }

  .admin-panel-v2 button {
    width: 100%;
    margin-right: 0;
  }
}

/* --- REMOVER BARRA DE ROLAGEM VISUAL (Mas manter funcionamento) --- */

.tutorial-content, 
.faq-container,
.terms-list {
    scrollbar-width: none; 
    -ms-overflow-style: none; 
    overflow-y: auto; 
}

/* Chrome, Safari e Opera */
.tutorial-content::-webkit-scrollbar,
.faq-container::-webkit-scrollbar,
.terms-list::-webkit-scrollbar {
    display: none;
}