:root {
  --bg: #121212;
  --text: #e0e0e0;
  --link: #8ab4f8;
  --border: #444;
  --input-bg: #1e1e1e;
  --input-text: #e0e0e0;
  --accent: #ffb86c;
}

body.light-mode {
  --bg: #ffffff;
  --text: #000000;
  --link: #0000ee;
  --border: #ccc;
  --input-bg: #ffffff;
  --input-text: #000000;
  --accent: #d36400;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: monospace; /* Simple monospace to fit hacker joke theme */
  max-width: 800px;
  margin: 20px auto;
  padding: 0 20px;
  line-height: 1.5;
}

h1, h2, h3 {
  border-bottom: 1px double var(--border);
  padding-bottom: 5px;
}

a {
  color: var(--link);
}

fieldset {
  border: 1px solid var(--border);
  margin-bottom: 15px;
  padding: 10px;
}

legend {
  font-weight: bold;
  padding: 0 5px;
}

input[type="text"], select, textarea {
  background-color: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--border);
  padding: 5px;
  font-family: inherit;
  box-sizing: border-box;
}

button {
  background-color: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--border);
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
}

button:hover {
  background-color: var(--border);
}

.theme-toggle-container {
  text-align: right;
  margin-bottom: 20px;
  font-size: 0.9em;
}

.hidden {
  display: none !important;
}

.success-message {
  color: #00ff66;
  font-weight: bold;
}

body.light-mode .success-message {
  color: #008800;
}

.troll-box {
  border: 3px double var(--accent);
  padding: 20px;
  margin: 20px 0;
  background-color: var(--input-bg);
}

.troll-alert {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--accent);
  text-align: center;
  margin-top: 0;
}

/* Widget Mode Styling */
body.widget-mode {
  margin: 0;
  padding: 10px;
  max-width: 100%;
  font-size: 0.9em;
  line-height: 1.3;
}

body.widget-mode .theme-toggle-container,
body.widget-mode h1,
body.widget-mode #troll-view p:nth-of-type(1), /* hides description */
body.widget-mode #troll-view p:nth-of-type(3), /* hides bottom link */
body.widget-mode hr {
  display: none !important;
}

body.widget-mode .troll-box {
  margin: 0;
  border-width: 1px;
  padding: 10px;
}

body.widget-mode .troll-alert {
  font-size: 1.1em;
  margin-bottom: 5px;
}
