:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #000;
  --button: #007bff;
}

body.dark {
  --bg: #121212;
  --card: #1e1e1e;
  --text: #fff;
  --button: #0d6efd;
}

* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: auto;
  background: var(--card);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

textarea {
  width: 100%;
  height: 220px;
  padding: 12px;
  font-size: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-top: 15px;
}

.stats {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  font-size: 14px;
}

.tool-box {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.tool-box input {
  flex: 1;
  padding: 8px;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

button {
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: var(--button);
  color: #fff;
}

button.copy { background: #28a745; }
button.export { background: #6f42c1; }
button.clear { background: #dc3545; }

mark {
  background: yellow;
  color: black;
}
