:root {
  --bg: #0f1f10;
  --pattern-url: "/assets/background-pattern.png";
  --pattern-size: 120px;            
  --pattern-speed: 10s;             
  --pattern-brightness: 1.25;

  --ink: #e9f5d2;
  --muted: #c8ddb1;

  --brand: #3b6f17;
  --brand-2: #2e5312;
  --brand-3: #4c8422;

  --danger: #8f2929;
  --success: #1e7c2f;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
  position: relative;
}

/* animated background stays */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url(var(--pattern-url, "/assets/default-pattern.png"));
  background-size: var(--pattern-size, 120px);
  background-repeat: repeat;
  filter: brightness(var(--pattern-brightness, 1.15));
  opacity: 0.25;
  z-index: -1;
  animation: scrollPattern 60s linear infinite;
  will-change: background-position;
}

@keyframes drift {
      from { background-position: 0 0; }
      to { background-position: var(--pattern-size) var(--pattern-size); }
}

/* ---- Layout ---- */
.header {
  width: 100%;
  max-width: 1100px;
  margin: 18px auto 10px;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  width: 80px;
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

.navButtons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btnLink {
  color: #f4eeba;
  text-decoration: none;
  padding: 8px 12px;
  background: var(--brand-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
.btnLink:hover {
  background: var(--brand-3);
}
.btnLink.danger {
  background: #5a1d1d;
}
.btnLink.danger:hover {
  background: #722323;
}

.main {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 0 16px;

  flex: 1; /* fill remaining screen space */
  display: flex;
  flex-direction: column;
}

/* solid containers so background doesn't bleed */
.card,
.listItem {
  background: #122112;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.hstack {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vstack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.listItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
}
.listItem .title {
  font-weight: 600;
}
.small {
  opacity: 0.8;
  font-size: 0.9rem;
  word-break: break-word;
}

.badge {
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 700;
}
.badge.pos {
  background: var(--success);
}
.badge.neg {
  background: var(--danger);
}

.iconBtn {
  border: 0;
  background: var(--brand-2);
  padding: 6px 10px;
  border-radius: 8px;
  color: #f4eeba;
  cursor: pointer;
}
.iconBtn:hover {
  background: var(--brand-3);
}
.iconBtn.danger {
  background: #5a1d1d;
}
.iconBtn.danger:hover {
  background: #722323;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0e1610;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.toolbar button,
.toolbar select,
.toolbar input[type="color"] {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f1a10;
  color: #fff;
  cursor: pointer;
}
.toolbar button:hover {
  background: #152417;
}

.editor {
  min-height: 180px;
  padding: 12px;
  border-radius: 10px;
  background: #0e1610;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  outline: none;
}

/* remove floater overlay */
.floater {
  display: none !important;
}

@media (max-width: 640px) {
  .logo {
    width: 48px;
  }
}