/* === Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background: url("https://www.nasa.gov/wp-content/themes/nasa/assets/images/404-bg.jpg") no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* === Cabeçalho === */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.85);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.nav-container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-size: 1.4em;
  font-weight: bold;
  color: #ffcc00;
}

/* === Menu === */
nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 25px;
}

nav ul li a {
  color: #ffcc00;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
  color: #fff;
}

/* === Botão Área do Professor === */
.admin-link {
  background: rgba(255, 204, 0, 0.1);
  border: 1px solid #ffcc00;
  border-radius: 6px;
  padding: 6px 10px;
  transition: 0.3s;
}

.admin-link:hover {
  background: #ffcc00;
  color: #000;
}

/* === Dropdown (Materiais e Pontuações) === */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: rgba(0, 0, 0, 0.95);
  top: 35px;
  left: 0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu li {
  width: 180px;
  text-align: left;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 15px;
  color: #ffcc00;
}

.dropdown-menu li a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* === Menu Mobile === */
.menu-toggle {
  display: none;
  font-size: 1.8em;
  color: #ffcc00;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.95);
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    padding: 15px 0;
    text-align: center;
  }

  nav ul.active {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 0;
  }

  .admin-link {
    display: inline-block;
    margin-top: 10px;
  }
}

/* === Estrutura === */
.spacer {
  height: 70px;
}

main {
  flex: 1;
}

.section {
  background: rgba(0, 0, 0, 0.7);
  margin: 40px auto;
  padding: 50px 20px;
  border-radius: 10px;
  max-width: 900px;
  text-align: center;
}

h1, h2 {
  color: #fff;
  margin-bottom: 20px;
}

p {
  color: #fff;
  margin-bottom: 10px;
}

/* === Links do corpo (brancos) === */
a {
  color: #fff;
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: #ffcc00;
  text-decoration: underline;
}

.card {
  background: rgba(0, 0, 0, 0.6);
  padding: 25px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* === Barras de pontuação === */
.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
}

.score-name {
  flex: 2;
  text-align: left;
  font-weight: bold;
}

.score-bar {
  flex: 4;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  height: 12px;
  margin: 0 10px;
  overflow: hidden;
}

.score-fill {
  background: #ffcc00;
  height: 100%;
  width: 0%;
  transition: width 0.8s ease;
}

.score-value {
  flex: 1;
  text-align: right;
}

/* === WORDLE === */
#wordle-grid {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}

.linha-wordle {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.celula-wordle {
  width: 55px;
  height: 55px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-weight: bold;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  transition: background 0.3s;
}

.celula-wordle.correta { background: #4caf50; color: #fff; }
.celula-wordle.posicao { background: #ffcc00; color: #000; }
.celula-wordle.incorreta { background: #555; color: #fff; }

.revelar {
  animation: flip 0.4s ease;
}

@keyframes flip {
  from { transform: rotateX(90deg); opacity: 0.6; }
  to { transform: rotateX(0); opacity: 1; }
}

.input-nome, .input-wordle {
  padding: 8px;
  border: none;
  border-radius: 5px;
  text-align: center;
  font-size: 16px;
}

.input-wordle {
  width: 150px;
  text-transform: uppercase;
  margin-right: 5px;
}

/* === Resultados Wordle (Área do Professor) === */
#tabelaResultados {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  color: #fff;
  font-size: 15px;
}

#tabelaResultados th, #tabelaResultados td {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px;
  text-align: center;
}

#tabelaResultados th {
  background: rgba(255, 204, 0, 0.15);
  color: #ffcc00;
}

#tabelaResultados tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

/* === Rodapé fixo === */
footer {
  background: rgba(0, 0, 0, 0.85);
  text-align: center;
  padding: 15px;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: auto;
}
