/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Estilos gerais */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: #0a192f;
  color: #8892b0;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 25, 47, 0.95);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: #112240;
  padding: 30px;
  border-radius: 10px;
  max-width: 600px;
  margin: auto;
  position: relative;
  border: 1px solid #233554;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal h2 {
  color: #64ffda;
  margin-bottom: 20px;
  font-size: 24px;
}

.modal p {
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Calendário */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-header h3 {
  color: #64ffda;
  font-size: 20px;
}

.calendar-nav {
  padding: 5px 10px;
  font-size: 18px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.weekday {
  color: #64ffda;
  font-weight: bold;
  padding: 10px;
  font-size: 14px;
}

.calendar-day {
  aspect-ratio: 1;
  background-color: #1a365d;
  border: 1px solid #233554;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  position: relative;
}

.calendar-day:not(.empty):not(.future):hover {
  background-color: #234668;
  transform: translateY(-2px);
}

.calendar-day.empty {
  background-color: transparent;
  border: none;
  cursor: default;
}

.calendar-day.future {
  background-color: #1a1a2e;
  color: #4a5568;
  cursor: not-allowed;
}

.calendar-day.completed {
  border-color: #64ffda;
  color: #64ffda;
}

.calendar-day.completed::after {
  content: '✓';
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  color: #64ffda;
}

.calendar-day.gaveup {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.calendar-day.gaveup::after {
  content: '×';
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  color: #ff6b6b;
}

/* Tutorial Steps */
.tutorial-steps {
  text-align: left;
  margin: 20px 0;
}

.step {
  margin-bottom: 20px;
}

.step h3 {
  color: #ccd6f6;
  margin-bottom: 10px;
  font-size: 18px;
}

.step p {
  color: #8892b0;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Cabeçalho */
header {
  background-color: #112240;
  color: #ccd6f6;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 24px;
  color: #64ffda;
}

nav a {
  color: #8892b0;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #64ffda;
}

/* Conteúdo principal */
main {
  padding: 40px 20px;
  flex: 1;
}

main h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #ccd6f6;
}

.game-area {
  background-color: #112240;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid #233554;
}

/* Grid de quadrados */
.grid-container {
  margin: 20px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
}

.square {
  aspect-ratio: 1;
  background-color: #1a365d;
  border: 2px solid #233554;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #64ffda;
  transition: all 0.3s ease;
  cursor: pointer;
}

.square.revealed {
  background-color: #234668;
  transform: rotateY(360deg);
}

/* Área de input */
.input-area {
  margin: 20px 0;
  position: relative;
}

#guessInput {
  padding: 10px 15px;
  font-size: 16px;
  border: 2px solid #233554;
  border-radius: 5px;
  background-color: #1a365d;
  color: #ccd6f6;
  width: 300px;
  margin-right: 10px;
  transition: border-color 0.3s ease;
}

#guessInput:focus {
  outline: none;
  border-color: #64ffda;
}

#guessInput.error {
  border-color: #ff6b6b;
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.error-message {
  position: absolute;
  color: #ff6b6b;
  font-size: 14px;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.error-message.show {
  opacity: 1;
}

@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }
  30%, 50%, 70% {
    transform: translate3d(-2px, 0, 0);
  }
  40%, 60% {
    transform: translate3d(2px, 0, 0);
  }
}

/* Botões */
.btn {
  background-color: transparent;
  color: #64ffda;
  border: 1px solid #64ffda;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  margin: 10px;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: rgba(100, 255, 218, 0.1);
  transform: translateY(-2px);
}

.btn.danger {
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.btn.danger:hover {
  background-color: rgba(255, 107, 107, 0.1);
}

/* Rodapé */
footer {
  background-color: #112240;
  color: #8892b0;
  padding: 10px;
  border-top: 1px solid #233554;
  margin-top: auto;
}