:root {
  --bg: #f4f4f4;
  --text: #333;
  --card: #fff;
  --accent: #0066cc;
}

.theme-dark {
  --bg: #0a0a0a;
  --text: #ccc;
  --card: #111;
  --accent: #800;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Georgia, serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.25s, color 0.25s;
}

.dm-light-only { display: block; }
.dm-dark-only { display: none; }
.theme-dark .dm-light-only { display: none; }
.theme-dark .dm-dark-only { display: block; }

.dm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-wrap: wrap;
  gap: 12px;
}

.theme-dark .dm-header { border-color: #300; }

.dm-logo { font-weight: bold; color: var(--accent); }
.dm-header nav a {
  margin-right: 16px;
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.7;
}

.dm-toggle { cursor: pointer; font-size: 0.85rem; display: flex; align-items: center; gap: 8px; }
.dm-toggle input { width: 18px; height: 18px; cursor: pointer; }

.dm-main { max-width: 800px; margin: 0 auto; padding: 32px 24px; }

.dm-hero h1 { font-size: 1.8rem; margin-bottom: 12px; }
.dm-hero p { line-height: 1.6; opacity: 0.85; }

.dm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.dm-card {
  padding: 20px;
  background: var(--card);
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

.theme-dark .dm-card { border-color: #300; }

.dm-card h2 { font-size: 1rem; margin-bottom: 8px; color: var(--accent); }
.dm-blood { color: #c00; font-family: 'Courier New', monospace; letter-spacing: 0.2em; }

.dm-silhouette-wrap { min-height: 120px; }

.dm-silhouette {
  position: absolute;
  bottom: 0;
  right: 10px;
  width: 50px;
  height: 90px;
  background: #000;
  border-radius: 30% 30% 0 0;
  opacity: 0;
  transition: opacity 0.2s, transform 0.3s;
}

.theme-dark .dm-silhouette {
  opacity: 0.85;
  animation: dm-creep 4s linear infinite;
}

@keyframes dm-creep {
  from { transform: translateX(60px); }
  to { transform: translateX(-20px); }
}

.dm-form-section { margin-top: 24px; }
.dm-form-row { display: flex; gap: 8px; margin-top: 12px; }
.dm-form-row input {
  padding: 10px 12px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  flex: 1;
  max-width: 200px;
}
.theme-dark .dm-form-row input {
  background: #111;
  border-color: #600;
  color: #f88;
}
.dm-form-row button {
  padding: 10px 16px;
  cursor: pointer;
  font-family: inherit;
}
.dm-msg { margin-top: 10px; font-size: 0.85rem; min-height: 1.2em; color: #c00; }

.dm-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.75rem;
  opacity: 0.5;
}

.dm-threat {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dm-threat[hidden] { display: none !important; }

.dm-threat-fig {
  width: 120px;
  height: 200px;
  background: #000;
  border-radius: 40% 40% 0 0;
  box-shadow: 0 0 60px rgba(255,0,0,0.3);
  animation: dm-lunge 0.4s ease-out;
}

@keyframes dm-lunge {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.dm-win {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  color: #c8a84b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.dm-win[hidden] { display: none !important; }
.dm-win h2 { font-family: 'Courier New', monospace; margin-bottom: 12px; }
.dm-win button { margin-top: 20px; padding: 10px 24px; cursor: pointer; }
