@import url('https://fonts.googleapis.com/css2?family=Nova+Flat&display=swap');

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #16213e;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: #1a1a2e;
  border: 1px solid #3a3a5e;
  padding: 1rem;
  text-align: center;
}

header a {
  font-family: 'Nova Flat', cursive;
  font-size: 22px;
  color: #ffd700;
  text-decoration: none;
}

header a:hover {
  text-decoration: none;
}

main {
  flex-grow: 1;
  padding: 1.5rem;
  max-width: 700px;
  margin: 40px auto;
  width: 100%;
  box-sizing: border-box;
  background: #f0f2f5;
  border-radius: 10px;
}

h1 {
  color: #fff;
  margin-bottom: -1rem;
  text-align: center;
}

#dropZone {
  border: 2px dashed #1e40af;
  background: #e0e7ff;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 1rem;
  transition: .3s;
  cursor: pointer;
}

#dropZone.dragover {
  background: #c7d2fe;
}

textarea {
  width: 100%;
  height: 150px;
  padding: .75rem;
  font-size: 1rem;
  border: 2px solid #1e40af;
  border-radius: 6px;
  margin-bottom: 1rem;
  resize: vertical;
  box-sizing: border-box;
  background: #fff;
  spellcheck: true;
}

.filename-input input {
  width: 100%;
  padding: .5rem;
  font-size: 1rem;
  border: 2px solid #1e40af;
  border-radius: 6px;
  box-sizing: border-box;
  margin: .3rem 0 .8rem 0;
}

.counter, .speed {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 1rem;
}

.history {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: .75rem;
  margin-bottom: .5rem;
  color: #444;
  max-height: 150px;
  overflow-y: auto;
}

.history h3 {
  margin: 0 0 .5rem;
  color: #1e40af;
}

.buttons, .history-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

button {
  background: #1e40af;
  color: white;
  border: none;
  padding: .6rem 1rem;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}

button:hover {
  background: #153e75;
}

#spellCheckBtn {
  background: #10b981;
}

#spellCheckBtn:hover {
  background: #0f9d77;
}

#suggestions {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: .75rem;
  margin-bottom: 1rem;
  max-height: 300px;
  overflow-y: auto;
  white-space: normal;
  font-family: Arial, sans-serif;
  color: #111827;
}

footer {
  background: #1a1a2e;
  border: 1px solid #3a3a5e;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

footer .left, footer .right {
  display: flex;
  gap: 1.5rem;
}

footer a {
  color: #0dcaf0;
  text-decoration: none;
}

@media (max-width: 500px) {
  .counter, .speed {
    flex-direction: column;
    gap: .4rem;
  }

  .buttons, .history-controls {
    flex-direction: column;
    width: 100%;
  }

  footer {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
  }
}
