html, body
{
  margin: 0;
  height: 100%;
  font-family: system-ui, sans-serif;
  background: var(--bg-dark);
  color: var(--text-dark);
  transition: background 0.3s, color 0.3s;
}

body.light
{
  background: var(--bg-light);
  color: var(--text-light);
}

:root
{
  --bg-dark: linear-gradient(135deg, #18262f, #438297);
  --bg-light: linear-gradient(135deg, #f9edea, #ffffff);
  --text-dark: #eee;
  --text-light: #1a1a1a;
  --accent-dark: #92c1ce;
  --accent-light: #a33c3c;
  --accent: var(--accent-dark);
}

body.light
{
  --accent: var(--accent-light);
}

#theme-toggle
{
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}

button
{
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  font-weight: bold;
  cursor: pointer;
}

button:hover
{
  opacity: 0.9;
}

.layout
{
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.top-container
{
  display: flex;
  justify-content: flex-end;
  padding: 0.5em;
}

.header-container
{
  display: flex;
  justify-content: center;
}

.main-container
{
  display: flex;
  gap: 2%;
  height: 100%;
  padding: 0 2% 2% 2%;
  box-sizing: border-box;
}

.left, .right
{
  flex: 1;
  border: 1px solid #444;
  box-sizing: border-box;
  padding: 1em;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}

body.light .left,
body.light .right
{
  background: rgba(255, 255, 255, 0.3);
  border-color: #bbb;
}

.nav
{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.nav button
{
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
}

.nav button.active
{
  background: var(--accent);
  color: white;
}

label
{
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

label input[type="text"]
{
  flex: 1;
  padding: 0.4rem;
  background: #1e1e1e;
  color: inherit;
  border: 1px solid #444;
  border-radius: 4px;
}

body.light label input[type="text"]
{
  background: #fff;
  border: 1px solid #ccc;
}

input[type="checkbox"]
{
  accent-color: var(--accent);
}

.info-wrapper
{
  display: inline-block;
  position: relative;
  font-size: 0.85rem;
}

textarea
{
  width: 100%;
  height: 100%;
  resize: none;
  background: rgba(0, 0, 0, 0.3);
  color: inherit;
  padding: 1rem;
  font-family: monospace;
  font-size: 0.9rem;
  border-radius: 4px;
  border: 1px solid #444;
  box-sizing: border-box;
}

body.light textarea
{
  background: rgba(255, 255, 255, 0.5);
  border-color: #bbb;
}

.action
{
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

#tab-contents
{
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.preset-block
{
  margin-bottom: 1.2rem;
}