html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  overflow-y: auto;
}


/* ========================= */
/* GLOBAL */
/* ========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Segoe UI';
  color: #1a1a1a;
  background: #fff9f9;
  overflow-x: hidden;
}

body::before {
  display: none;
}

body::after {
  content: "";
  position: fixed;
  bottom: -150px;
  right: -150px;
  width: 500px;
  height: 500px;
  background: #ff0077;
  filter: blur(250px);
  opacity: 0.12;
  z-index: -1;
}

/* ========================= */
/* TITULOS */
/* ========================= */

h1 {
  font-size: 38px;
  margin: 0;
  letter-spacing: 2px;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 20px;
  font-weight: 600;
}

/* ========================= */
/* LAYOUT ADMIN */
/* ========================= */

.container {
  display: flex;
  gap: 30px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 30px;
}

.sidebar {
  width: 280px;
  background: #ffffff;
  padding: 25px;
  border-radius: 20px;
  border: 2px solid #e0e0e0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  height: fit-content;
}

.sidebar h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
  letter-spacing: 1px;
  color: #1a66cc;
}

.sidebar ul {
  padding: 0;
  list-style: none;
  margin-top: 15px;
}

.sidebar li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 2, 2, 0.05);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main {
  flex: 1;
}

/* ========================= */
/* TOPO ADMIN */
/* ========================= */

.topo-admin {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-ranking,
.btn-logout {
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

/* Ranking */
.btn-ranking {
  background: linear-gradient(135deg, #00f7ff, #ffffff);
  color: rgb(0, 0, 0);
}

/* Logout */
.btn-logout {
  background: #ff3b3b;
  color: white;
}

/* ========================= */
/* CARDS */
/* ========================= */

.card-admin {
  background: rgb(255, 255, 255);
  padding: 30px;
  margin-bottom: 25px;
  border-radius: 20px;
  border: 1px solid rgb(27, 22, 117);
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  transition: 0.3s ease;
}

.card-admin:hover {
  transform: translateY(-5px);
}

/* ========================= */
/* INPUTS */
/* ========================= */

input,
select {
  padding: 12px 14px;
  margin: 8px 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  width: 100%;
  background: rgba(255,255,255,0.05);
  color: rgb(0, 0, 0);
  outline: none;
  transition: 0.3s;
}

input:focus,
select:focus {
  border: 1px solid #301879;
  box-shadow: 0 0 10px rgba(0,247,255,0.4);
}

/* ========================= */
/* SELECT de players campeões */
/* ========================= */

select {
  background: #ffee00;
  color: rgb(0, 0, 0);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

select option {
  background: #1c1c2e;
  color: rgb(0, 0, 0);
}

/* ========================= */
/* BOTÕES */
/* ========================= */


/* ========================= */
/* Botão salvar campeonato e excluir campeonato aqui  nesse button */
/* ========================= */
button {
  padding: 10px 18px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, #6947ff);
  font-weight: bold;
  transition: 0.3s;
  margin-bottom: 10px;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(25, 0, 255, 0.634);
}



/* Botão excluir */
.btn-excluir {
  background: #ff3b3b;
  color: white;
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: 0.2s;
}

.btn-excluir:hover {
  background: #ff0000;
  transform: scale(1.1);
}


.sidebar li button {
  width: auto !important;
  min-width: 32px;
  height: 32px;
  padding: 0;
  flex-shrink: 0;
}

/* Botão logout */
.btn-logout {
  background: #ff3b3b;
  color: white;
}

.btn-logout:hover {
  background: #ff0000;
}

/* ========================= */
/* LISTA CAMPEONATOS */
/* ========================= */

#listaTitulos {
  margin-top: 20px;
  display: grid;
  gap: 20px;
}

/* ========================= */
/* MODAL */
/* ========================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  justify-content: center;
  align-items: center;
  padding: 40px;
  z-index: 999;
}

.modal-content {
  background: white;
  color: black;
  padding: 40px 30px;
  border-radius: 20px;
  width: 350px;
  max-width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

#fechar {
  position: absolute;
  top: 15px;
  right: 20px;
  cursor: pointer;
  font-size: 26px;
  font-weight: bold;
  transition: 0.2s;
}

#fechar:hover {
  transform: scale(1.2);
  color: red;
}



/* ========================= */
/* RESPONSIVO MOBILE REAL */
/* ========================= */

@media (max-width: 768px) {

  /* Layout geral */
  .container {
    flex-direction: column;
    padding: 20px 15px;
    gap: 20px;
  }

  /* Sidebar vira bloco normal */
  .sidebar {
    width: 100%;
    padding: 20px;
  }

  /* Topo admin */
  .topo-admin {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .topo-admin h1 {
    font-size: 24px;
    text-align: center;
  }

  /* Cards */
  .card-admin {
    padding: 20px;
  }

  /* Inputs mais confortáveis */
  input,
  select {
    font-size: 16px;
  }

  /* Botões full largura */
  .btn-ranking,
.btn-logout {
  width: 100%;
  text-align: center;
}

  /* Lista campeonatos */
  .sidebar ul {
  padding: 0;
  list-style: none;
  margin-top: 15px;
}

.sidebar li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  font-size: 15px;
}

.sidebar li:hover {
  background: rgba(255,255,255,0.08);
}

  /* Modal */
  .modal {
    padding: 20px;
  }

  .modal-content {
    width: 100%;
    padding: 25px 20px;
  }

 

  /* Títulos globais menores */
  h1 {
    font-size: 26px;
    text-align: center;
  }

  h2 {
    font-size: 18px;
    text-align: center;
  }

}

.camp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.seta {
  font-size: 18px;
  transition: 0.2s;
}

.camp-detalhes {
  margin-top: 15px;
  animation: expandir 0.2s ease;
}

@keyframes expandir {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}


*{
box-sizing:border-box;
margin:0;
padding:0;
font-family:Segoe UI;
}

body{
height:100vh;
}

.tabela-pontos{
width:100%;
border-collapse:collapse;
margin-top:10px;
}

.tabela-pontos thead{
border-bottom:2px solid #444;
}

.tabela-pontos th{
text-align:left;
padding:10px;
font-size:14px;
color:#bbb;
}

.tabela-pontos td{
padding:10px;
border-bottom:1px solid #333;
font-size:15px;
}

.tabela-pontos td:nth-child(2),
.tabela-pontos td:nth-child(3),
.tabela-pontos td:nth-child(4),
.tabela-pontos td:nth-child(5){
text-align:center;
width:60px;
}

.tabela-pontos td:last-child{
text-align:right;
width:70px;
}

.btnExcluirPontuacao{
background:#1a73e8;
border:none;
color:white;
padding:10px 18px;
border-radius:10px;
cursor:pointer;
width: 40px;
}

.btnExcluirPontuacao:hover{
opacity:0.8;
}

.camp-header{
cursor:pointer;
}

/* SELECT2 DARK MODE COMPLETO */

.select2-container--default .select2-selection--single{
background-color:#1e2130 !important;
border:1px solid #2f3348 !important;
height:38px;
}

.select2-container--default .select2-selection__rendered{
color:white !important;
line-height:38px !important;
}

.select2-container--default .select2-selection__arrow b{
border-color:white transparent transparent transparent !important;
}

.select2-dropdown{
background-color:#1e2130 !important;
border:1px solid #2f3348 !important;
}

.select2-results__option{
background-color:#1e2130 !important;
color:white !important;
}

.select2-results__option--highlighted{
background-color:#3a6ff7 !important;
color:white !important;
}

.select2-search--dropdown .select2-search__field{
background-color:#1e2130 !important;
color:white !important;
border:1px solid #2f3348 !important;
}

/* SELECT2 ESTILO BONITO */

.select2-container--default .select2-selection--single{
background-color:#1e2130 !important;
border:1px solid #2f3348 !important;
height:42px !important;
border-radius:10px !important;
padding-left:10px;
}

.select2-container--default .select2-selection__rendered{
color:white !important;
line-height:42px !important;
}

.select2-dropdown{
background:#1e2130 !important;
border:1px solid #2f3348 !important;
border-radius:10px !important;
overflow:hidden;
}

.select2-results__option{
background:#1e2130 !important;
color:white !important;
padding:10px;
}

.select2-results__option--highlighted{
background:#3a6ff7 !important;
color:white !important;
}

.select2-search--dropdown{
padding:10px;
}

.select2-search--dropdown .select2-search__field{
background:#151826 !important;
color:white !important;
border:1px solid #2f3348 !important;
border-radius:8px !important;
padding:6px;
}

.linha-podio{
display:flex;
align-items:center;
justify-content:space-between;
gap:15px;
margin-bottom:10px;
}

.linha-podio label{
color:rgb(0, 0, 0);
font-weight:600;
min-width:180px;
}

.linha-podio select{
flex:1;
}

.linha-estat{
display:flex;
align-items:center;
justify-content:space-between;
gap:15px;
margin-bottom:10px;
}

.linha-estat label{
color:rgb(0, 0, 0);
font-weight:600;
min-width:180px;
}

.linha-estat select{
flex:1;
}

.menu-logo img {
  height: 50px; /* ajusta a altura da logo */
  width: auto;
}

.btnEditarPontuacao,
.btnExcluirPontuacao{
  border:none;
  padding:6px 10px;
  margin:2px;
  border-radius:6px;
  cursor:pointer;
}

/* ========================= */
/* EDITOR DE REGRAS MELHORADO */
/* ========================= */

.card-editar-regras-container {
  background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
  border: 2px solid #1a66cc;
  border-radius: 16px;
  padding: 0;
  margin: 40px auto;
  max-width: 1000px;
  box-shadow: 0 8px 32px rgba(26, 102, 204, 0.15);
  overflow: hidden;
}

.regras-header {
  background: linear-gradient(135deg, #1a66cc, #1a1a5e);
  color: white;
  padding: 30px;
  border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

.regras-header h2 {
  margin: 0 0 10px 0;
  font-size: 1.8em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}

.regras-subtitle {
  margin: 0;
  font-size: 0.95em;
  opacity: 0.95;
  font-weight: 300;
}

.regras-editor-box {
  padding: 30px;
}

.regras-toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f0f4f8;
  border-radius: 10px;
  flex-wrap: wrap;
}

.regras-toolbar-group {
  display: flex;
  gap: 5px;
  border-right: 2px solid #ddd;
  padding-right: 15px;
}

.regras-toolbar-group:last-child {
  border-right: none;
}

.btn-toolbar {
  padding: 8px 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #333;
  min-width: 35px;
  height: 35px;
}

.btn-toolbar:hover {
  background: #1a66cc;
  color: white;
  border-color: #1a66cc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 102, 204, 0.3);
}

.btn-toolbar:active,
.btn-toolbar.btn-active {
  background: #ff0077;
  color: white;
  border-color: #ff0077;
  box-shadow: 0 0 0 2px rgba(255, 0, 119, 0.2);
}

.btn-format {
  min-width: 38px;
}

.regras-counter {
  margin-left: auto;
  background: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1a66cc;
  border: 1px solid #1a66cc;
  white-space: nowrap;
}

#editorRegras {
  width: 100%;
  min-height: 450px;
  padding: 20px;
  font-family: 'Segoe UI', 'Roboto', -apple-system, sans-serif;
  font-size: 15px;
  border: 2px solid #e0e7ff;
  border-radius: 12px;
  line-height: 1.8;
  box-sizing: border-box;
  transition: all 0.3s ease;
  background: #fafbfc;
  color: #1a1a1a;
  outline: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#editorRegras:focus {
  border-color: #1a66cc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(26, 102, 204, 0.1), 0 0 12px rgba(26, 102, 204, 0.3);
}

#editorRegras.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.regras-actions {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn-salvar-regras {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #1a66cc, #1a1a5e);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(26, 102, 204, 0.3);
}

.btn-salvar-regras:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(26, 102, 204, 0.4);
}

.btn-salvar-regras:active {
  transform: translateY(-1px);
}

.btn-salvar-regras.btn-success {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.regras-feedback {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  min-height: 22px;
  animation: slideDown 0.3s ease;
}

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

.feedback-success {
  color: #2e7d32;
  display: inline-block;
  padding: 8px 16px;
  background: #e8f5e9;
  border-radius: 8px;
  border-left: 4px solid #4caf50;
}

.feedback-error {
  color: #c62828;
  display: inline-block;
  padding: 8px 16px;
  background: #ffebee;
  border-radius: 8px;
  border-left: 4px solid #f44336;
}

.feedback-info {
  color: #1565c0;
  display: inline-block;
  padding: 8px 16px;
  background: #e3f2fd;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
}

@media (max-width: 768px) {
  .card-editar-regras-container {
    margin: 20px;
  }
  
  .regras-header {
    padding: 20px;
  }
  
  .regras-editor-box {
    padding: 20px;
  }
  
  #textareaRegras {
    height: 300px;
    font-size: 14px;
  }
  
  .regras-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-toolbar,
  .regras-counter {
    width: 100%;
    margin-left: 0;
  }
}