/* =================== */
/* Variáveis de Cores e Fonte */
:root {
  --blue-dark: #002244;
  --blue: #007bff;
  --blue-hover: #0056b3;
  --green: #28a745;
  --green-dark: #1e7e34;
  --red: #dc3545;
  --red-dark: #b02a37;
  --yellow: #ffc107;
  --yellow-dark: #e0a800;
  --bg-light: #e9ecef;
  --text-light: #fff;
  --text-dark: #000;
  --font-family: 'Poppins', sans-serif;
}

/* =================== */
/* Reset e Base */
*, *::before, *::after {
  box-sizing: border-box;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

body {
  font-family: var(--font-family);
  margin: 0;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

/* =================== */
/* Header e Navegação */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--blue-dark);
  color: var(--text-light);
  padding: 10px 20px;
  flex-wrap: wrap;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 60px;
  height: auto;
}

nav {
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all .3s ease;
}

.menu-list {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.menu-list li {
  display: inline-block;
}

.menu-list a, .menu-list span {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  display: inline-block;
  transition: background-color .3s, transform .2s;
}

.menu-list a:hover, .menu-list a.ativo {
  background-color: var(--blue-hover);
  transform: translateY(-2px);
  color: var(--text-light);
}

.menu-list .login-btn {
  background-color: var(--blue);
}

.menu-list .login-btn:hover {
  background-color: var(--blue-hover);
}

.menu-list .logout-btn {
  background-color: var(--red);
}

.menu-list .logout-btn:hover {
  background-color: var(--red-dark);
}

.user-name {
  color: var(--yellow);
  font-weight: 600;
  padding: 6px 10px;
  cursor: default;
}

nav a.btn-medico {
  background-color: var(--green);
  color: var(--text-light) !important;
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color .3s ease;
  margin-left: 10px;
  white-space: nowrap;
}

nav a.btn-medico:hover {
  background-color: var(--green-dark);
  color: var(--text-light) !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 28px;
  cursor: pointer;
}

.menu-toggle:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* =================== */
/* Conteúdo Principal */
.container {
  max-width: 1000px;
  margin: 30px auto;
  background: var(--text-light);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
}

.player-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  width: 250px;
  background: var(--text-light);
  text-align: center;
  box-shadow: 0 0 5px rgba(0,0,0,.1);
  transition: transform .2s ease;
}

.player-card:hover {
  transform: scale(1.03);
}

.player-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.player-card a, .btn-register {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  background-color: var(--blue);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color .3s ease;
  cursor: pointer;
}

.player-card a:hover, .btn-register:hover {
  background-color: var(--blue-hover);
}

.players {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

/* =================== */
/* Footer */
footer {
  text-align: center;
  background: var(--blue-dark);
  color: var(--text-light);
  padding: 15px;
  margin-top: 30px;
}

/* =================== */
/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,.6);
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--text-light);
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 4px 15px rgba(0,0,0,.2);
  text-align: center;
  position: relative;
  animation: fadeIn .4s ease;
}

.fechar {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 25px;
  cursor: pointer;
  color: #555;
  transition: color .3s;
}

.fechar:hover {
  color: #000;
}

.modal-content h2 {
  color: var(--blue-dark);
  margin-bottom: 10px;
}

.modal-content p {
  color: #555;
  margin-bottom: 20px;
}

/* Botão Entrar */
.btn-login {
  display: inline-block;
  background-color: var(--blue);
  color: var(--text-light);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .3s ease;
}

.btn-login:hover {
  background-color: var(--blue-hover);
}

/* =================== */
/* Modal Sections - Horizontal Layout */
.modal-sections {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: nowrap;    /* força linha única */
  overflow-x: auto;     /* scroll horizontal para telas pequenas */
  padding-bottom: 10px; /* evita cortar sombra */
}

.modal-section {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  width: 180px;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
  flex-shrink: 0;
}

.modal-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(0,0,0,.1);
}

/* Botões específicos dentro do modal */
.btn-jogador {
  background-color: var(--green);
  color: var(--text-light);
  padding: 8px 15px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background-color .3s ease;
  margin-top: 10px;
}

.btn-jogador:hover {
  background-color: var(--green-dark);
}

.btn-clube {
  background-color: var(--yellow);
  color: #222;
  padding: 8px 15px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background-color .3s ease;
  margin-top: 10px;
}

.btn-clube:hover {
  background-color: var(--yellow-dark);
  color: var(--text-light);
}

.btn-medico {
  background-color: var(--red);
  color: var(--text-light);
  padding: 8px 15px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background-color .3s ease;
  margin-top: 10px;
}

.btn-medico:hover {
  background-color: var(--red-dark);
}

.btn-treinador {
  background-color: var(--blue);
  color: var(--text-light);
  padding: 8px 15px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background-color .3s ease;
  margin-top: 10px;
}

.btn-treinador:hover {
  background-color: var(--blue-hover);
}

/* Links dentro das seções modal */
.modal-section a {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  color: var(--text-light);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .3s ease;
}

/* =================== */
/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =================== */
/* Responsividade */
@media(max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-toggle {
    display: block;
    align-self: flex-end;
    margin-bottom: 10px;
  }

  nav {
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    width: 100%;
    background-color: #001833;
    transition: max-height .4s ease-in-out;
  }

  nav.active {
    max-height: 500px;
  }

  .menu-list {
    flex-direction: column;
    gap: 10px;
  }

  nav a, nav span {
    padding: 10px 20px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, .1);
  }

  nav a.btn-medico {
    display: block;
    margin-left: 0;
    margin-top: 10px;
    text-align: center;
  }

  .players {
    justify-content: center;
  }
}

/* =================== */
/* Foco acessível */
a:focus, button:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}