:root {
  --bg-color: #0e1117;
  --text-color: #e4e6eb;
  --container-bg: #1a1d26;
  --highlight: #0ff1ce;
  --textarea-bg: #2a2f3b;
}

body.light {
  --bg-color: #ffffff;
  --text-color: #000000;
  --container-bg: #f2f2f2;
  --highlight: #007bff;
  --textarea-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

.container {
  width: 95%;
  max-width: 750px;
  background: var(--container-bg);
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

h1 {
  text-align: center;
  color: var(--highlight);
  margin-bottom: 20px;
  font-size: 2rem;
}

textarea {
  width: 100%;
  height: 120px;
  padding: 15px;
  font-size: 1rem;
  background: var(--textarea-bg);
  color: inherit;
  border: none;
  border-radius: 8px;
  resize: none;
  margin-top: 15px;
}

.buttons {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

button {
  background: var(--highlight);
  color: #000;
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
}

button:hover {
  opacity: 0.85;
}

.output {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.output > div {
  flex: 1;
}

pre {
  background: var(--textarea-bg);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 0.95rem;
  margin: 0;
}

/* Login Screen Styling */
.login-screen {
  background: var(--container-bg);
  border-radius: 16px;
  padding: 40px 30px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-screen h2 {
  color: var(--highlight);
  margin-bottom: 20px;
}

.login-screen input {
  padding: 10px;
  width: 100%;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  margin-bottom: 15px;
}

.login-screen button {
  width: 100%;
}

/* Responsive Tweaks */
@media (max-width: 600px) {
  .container {
    padding: 30px 20px;
  }

  button {
    width: 100%;
    margin-top: 10px;
  }

  .buttons {
    flex-direction: column;
  }
}

/* Dark/Light mode toggle */
#modeToggle {
  padding: 5px 12px;
  font-size: 1.2rem;
  cursor: pointer;
  background: var(--highlight);
  border: none;
  color: #000;
  border-radius: 8px;
}

#modeLabel {
  font-size: 0.95rem;
  color: var(--highlight);
}

#encryptedText {
  margin-bottom: 12px;
}
