:root {
    --neon-pink: #FF00FF;
    --neon-red: #FF2A2A;
    --neon-blue: #00BFFF;
    --neon-green: #00FF7F;
    --neon-yellow: #FFFF00;
    --dark-bg: #1A1A2E;
    --card-bg: #2D2D44;
    --text-primary: #FFFFFF;
}

.tournament-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
}

.tournament-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
    padding: 30px;
    background: linear-gradient(145deg, rgba(45, 45, 68, 0.8), rgba(58, 58, 82, 0.8));
    border-radius: 20px;
    box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
    overflow: hidden;
}

.tournament-header::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    background: linear-gradient(45deg, var(--disco-pink), var(--disco-blue), var(--disco-green), var(--disco-yellow));
    border-radius: 22px;
    z-index: 1;
    opacity: 0.7;
    height: 8px;
    width: 100%;
}

.tournament-header::after {
    content: '';
    position: absolute;
    top: 5px;
    right: -30px;
    width: 80px;
    height: 40px;
    background: var(--disco-pink);
    transform: rotate(45deg);
    box-shadow: 0 2px 15px rgba(255, 0, 255, 0.6);
    z-index: 2;
}

.tournament-icon {
    font-size: 6rem;
    margin-right: 30px;
    color: var(--disco-yellow);
    text-shadow: 0 0 15px currentColor;
    position: relative;
    z-index: 1;
}

.tournament-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.tournament-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--neon-text);
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.tournament-game {
    font-size: 1.5rem;
    color: var(--disco-green);
    margin-bottom: 20px;
    text-shadow: 0 0 5px var(--disco-green);
}

.tournament-status {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(90deg, var(--disco-green), var(--disco-blue));
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0, 255, 127, 0.4);
}

.view-bracket-area{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-right: 15px;
}

.brackets-btn {
  /* --- Visual Original Mantido --- */
  background: linear-gradient(90deg, var(--disco-pink), var(--disco-blue));
  border: none;
  color: var(--neon-text);
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 
    0 5px 15px rgba(255, 0, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  
  /* --- CORREÇÃO AQUI --- */
  display: flex;             /* Transforma em caixa flexível (respeita o overflow) */
  align-items: center;       /* Centraliza verticalmente o ícone e texto */
  justify-content: center;   /* Centraliza horizontalmente */
  gap: 10px;                 /* Espaço entre o ícone e o texto */
  
  position: relative;
  overflow: hidden;          /* Agora vai funcionar e cortar o brilho */
  z-index: 1;
  
  /* Tipografia */
  letter-spacing: 2px;
  font-size: 1.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.brackets-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: all 0.5s ease;
  
  /* --- CORREÇÃO DO Z-INDEX --- */
  /* Se deixar -1, ele pode sumir atrás do gradiente do botão. 
     Use 2 para ficar acima do fundo, mas abaixo do texto (se o texto tiver z-index maior)
     ou simplesmente deixe passar por cima do texto já que é transparente. */
  z-index: 2; 
  pointer-events: none; /* Garante que o brilho não atrapalhe o clique */
}

/* Opcional: Para garantir que o Texto fique SOBRE o brilho */
.brackets-btn i, 
.brackets-btn span { 
    /* Nota: Se possível, envolva o texto "Ver Chaves" num <span> no HTML */
    position: relative;
    z-index: 3;
}

.brackets-btn:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 10px 25px rgba(0, 191, 255, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.brackets-btn:hover::before {
  left: 100%;
}


.tournament-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.tournament-details {
    background: linear-gradient(145deg, rgba(45, 45, 68, 0.8), rgba(58, 58, 82, 0.8));
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

.tournament-details::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    background: linear-gradient(45deg, var(--disco-pink), var(--disco-blue), var(--disco-green), var(--disco-yellow));
    border-radius: 22px;
    z-index: 1;
    opacity: 0.7;
    height: 8px;
    width: 100%;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--neon-text);
    margin-bottom: 25px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, var(--disco-pink), transparent);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-label {
    font-size: 0.9rem;
    color: var(--disco-green);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 5px var(--disco-green);
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neon-text);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.prize-value {
    color: var(--disco-yellow);
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.7);
}

.tournament-description {
    margin-top: 30px;
}

.description-text {
    line-height: 1.6;
    color: var(--neon-text);
    font-size: 1.1rem;
}

  .first-text{
    margin-bottom: 1rem;
  }

  .mode{
    color: var(--disco-yellow);
}

.tournament-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.registration-box {
    background: linear-gradient(145deg, rgba(45, 45, 68, 0.8), rgba(58, 58, 82, 0.8));
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.registration-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    background: linear-gradient(45deg, var(--disco-pink), var(--disco-blue), var(--disco-green), var(--disco-yellow));
    border-radius: 22px;
    z-index: 1;
    opacity: 0.7;
    height: 8px;
    width: 100%;
}

.registration-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--neon-text);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.registration-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--disco-yellow);
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(255, 255, 0, 0.7);
}

.registration-btn {
    background: linear-gradient(90deg, var(--disco-pink), var(--disco-blue));
    border: none;
    color: var(--neon-text);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    padding: 18px 30px;
    border-radius: 8px;
    box-shadow: 
    0 5px 15px rgba(255, 0, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
    letter-spacing: 2px;
    font-size: 1.1rem;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.registration-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.registration-btn:hover {
    transform: translateY(-5px);
    box-shadow: 
    0 10px 25px rgba(0, 191, 255, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
   
}

.registration-btn:hover::before {
    left: 100%;
}

.create-team-btn {
    background: linear-gradient(135deg, #00ff7f, #00bfff);
    border: none;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    padding: 15px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 5px 15px rgba(0, 255, 127, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
    gap: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 1rem;
    z-index: 500;
}

.create-team-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
    0 8px 20px rgba(0, 255, 127, 0.6),
    0 0 20px rgba(0, 191, 255, 0.4);
}   

/* Estilos para times inscritos e botão de sair */
.registered-teams-section {
  margin: 15px 0;
}

.registered-team-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-info-small {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-info-small i {
  color: var(--disco-yellow);
  font-size: 1.2rem;
}

.team-name {
  color: var(--neon-text);
  font-weight: 600;
}

.unregister-btn {
  background: linear-gradient(90deg, #ff4757, #ff3742);
  border: none;
  color: white;
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.unregister-btn:hover {
  background: linear-gradient(90deg, #ff3742, #ff4757);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.create-team-btn {
  background: linear-gradient(90deg, var(--disco-green), var(--disco-blue));
  border: none;
  color: var(--neon-text);
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 255, 127, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
  width: 100%;
  position: relative;
  overflow: hidden;
  z-index: 1;
  letter-spacing: 1px;
  font-size: 1rem;
  margin-top: 10px;
}

.create-team-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 191, 255, 0.6);
}

/* Estados do torneio */
.registration-info.closed {
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.3);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  color: var(--neon-text);
}

.registration-info.full {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  color: var(--neon-text);
}

.registration-info.no-teams {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  color: var(--neon-text);
  margin-bottom: 10px;
}

.registration-info.login-required {
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.3);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  color: var(--neon-text);
}

.registration-info {
    font-size: 0.9rem;
    margin-top: 20px;
    color: var(--baby-blue);
    line-height: 1.5;
}

.rules-box {
    background: linear-gradient(145deg, rgba(45, 45, 68, 0.8), rgba(58, 58, 82, 0.8));
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

.rules-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    background: linear-gradient(45deg, var(--disco-pink), var(--disco-blue), var(--disco-green), var(--disco-yellow));
    border-radius: 22px;
    z-index: 1;
    opacity: 0.7;
    height: 8px;
    width: 100%;
}

.rules-list {
    list-style-type: none;
    margin-bottom: 1rem;
}

.rules-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--neon-text);
    position: relative;
    padding-left: 25px;
}

.rules-list li:last-child {
    border-bottom: none;
}

.rules-list li::before {
    content: '•';
    color: var(--disco-green);
    position: absolute;
    left: 0;
    text-shadow: 0 0 5px var(--disco-green);
}

/* Estilos para a seção de regras */
.tournament-rules {
    margin-top: 25px;
    justify-content: center;
}

.kill-race-guide {
    background: rgba(20, 20, 35, 0.9);
    border: 1px solid var(--disco-blue);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
}

.mode-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    color: var(--disco-blue);
}

.mode-header i { font-size: 2rem; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.step-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    position: relative;
    border-bottom: 3px solid var(--disco-pink);
}

.step-num {
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    font-family: 'Orbitron', sans-serif;
}

.step-card h4 {
    color: var(--neon-text);
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
}

.step-card p {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
}

.rules-callout {
    margin-top: 25px;
    padding: 15px;
    background: rgba(0, 255, 127, 0.1);
    border-left: 4px solid var(--disco-green);
    border-radius: 5px;
    color: #eee;
}

.tie-breaker-mini {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--disco-green);
}
  

.participants-box {
    background: linear-gradient(145deg, rgba(45, 45, 68, 0.8), rgba(58, 58, 82, 0.8));
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

.participants-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    background: linear-gradient(45deg, var(--disco-pink), var(--disco-blue), var(--disco-green), var(--disco-yellow));
    border-radius: 22px;
    z-index: 1;
    opacity: 0.7;
    height: 8px;
    width: 100%;
}

.br-mode .mode-header {
    color: var(--disco-green); /* Verde para diferenciar do azul do Kill Race */
}

.points-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    font-size: 0.85rem;
    letter-spacing: 1px;
    
}

.points-list li {
    margin-bottom: 7px;
    color: #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.points-list li i {
    color: var(--disco-green);
    width: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.br-mode .step-card {
    border-bottom: 3px solid var(--disco-green);
}

.participants-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--disco-green);
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 127, 0.7);
}

.participants-progress {
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--disco-green), var(--disco-blue));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.participants-text {
    text-align: center;
    color: var(--baby-blue);
    font-size: 0.9rem;
}

.registered-teams-section-main {
  margin-top: 30px;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.team-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 15px;
  backdrop-filter: blur(10px);
  position: relative;
}

.team-card.my-team {
  border: 2px solid var(--disco-green);
  background: rgba(76, 175, 80, 0.1);
}

.my-team-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--disco-green);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.no-teams-message {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  padding: 40px;
}




/* Links de criação de time */
.create-team-link, .login-link {
  color: var(--disco-yellow);
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-top: 8px;
}

.create-team-link:hover, .login-link:hover {
  text-decoration: underline;
  color: var(--disco-green);
}

/* Informações de registro */
.registration-info.closed,
.registration-info.full {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  margin: 10px 0;
  color: var(--neon-text);
}

.registration-info.no-teams {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  margin: 10px 0;
  color: var(--neon-text);
}

.registration-info.login-required {
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.3);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  margin: 10px 0;
  color: var(--neon-text);
}

/* Melhorias no modal */
.modal-container {
  max-width: 500px;
  width: 90%;
}

.warning-box {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0;
}

.warning-icon {
  color: #ffc107;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.warning-content h4 {
  margin: 0 0 5px 0;
  color: var(--neon-text);
}

.warning-content p {
  margin: 0;
  color: var(--baby-blue);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Loading no botão */
.fa-spin {
  animation: fa-spin 1s infinite linear;
}

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

.registered-team-item {
    transition: opacity 0.5s ease;
}

.modal-refund-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-refund-content {
    background: #1e1e2e; color: white; padding: 25px; border-radius: 12px;
    max-width: 400px; width: 90%; text-align: center; border: 1px solid #333;
}
.modal-actions { display: flex; justify-content: space-around; margin-top: 20px; }
.btn-cancel { background: #444; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; }
.btn-confirm-danger { background: #e74c3c; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; }
.btn-confirm-danger:hover { background: #c0392b; }