@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #121212;
  --surface: rgba(30, 30, 30, 0.6);       /* semi-transparent cards */
  --surface-soft: rgba(26, 26, 26, 0.5);  /* map container background */
  --border: rgba(51, 51, 51, 0.5);
  --text: #e0e0e0;
  --muted: #aaa;
  --accent: #00ff00;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1rem;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
}

#particle-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #121212;
}

h2 {
  margin-bottom: 1rem;
  font-weight: 600;
}

/* All cards: note card, controls card, map card, region info */
.card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);  /* soft blur for readability */
}

.notes-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.controls-card {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.controls-card select,
.controls-card input {
  flex: 1;
  min-width: 150px;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(34, 34, 34, 0.6);  /* transparent inputs */
  color: var(--text);
}

.controls-card button {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  border: 2px solid #222;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.controls-card button:hover,
.controls-card button:active {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

#storyInput {
  width: 100%;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(34, 34, 34, 0.6);   /* transparent textarea */
  color: var(--text);
  resize: vertical;
  margin-bottom: 1rem;
}

.map-card {
  padding: 0.5rem;
  background: var(--surface);  /* semi-transparent */
}

#map-container {
  overflow: auto;
  background: var(--surface-soft);  /* semi-transparent map background */
  border-radius: 10px;
  border: 1px solid var(--border);
}

#map-container svg {
  width: 100%;
  height: auto;
  display: block;
}

path {
  fill: #555;
  stroke: #222;
  stroke-width: 0.6;
  cursor: pointer;
  transition: stroke 0.2s, stroke-width 0.2s;
}

path:hover {
  stroke: #777;
}

path.selected {
  stroke: var(--accent);
  stroke-width: 2.5;
}

/* Grid lines */
.grid line {
  stroke: #2a2a2a;
  stroke-width: 0.5;
}

.region-info {
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  background: var(--surface);         /* semi-transparent */
  border-radius: 10px;
  padding: 0.5rem;
}

footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .controls-card {
    flex-direction: column;
  }
}
