:root {
  --bg: #0f0e0c;
  --surface: #1a1916;
  --border: #2e2c27;
  --accent: #f5c542;
  --accent2: #e07b3f;
  --text: #f0ece0;
  --muted: #7a7669;
  --danger: #e05c5c;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  min-height: 100vh;
  padding: 2rem 1rem 4rem;
}

header {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

header h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}

header h1 span { color: var(--accent); }

header p {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.container { max-width: 640px; margin: 0 auto; }

/* Form */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }

label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

input:focus { border-color: var(--accent); }
input::placeholder { color: var(--muted); }

button {
  background: var(--accent);
  color: #0f0e0c;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.2rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

button:hover { background: #f7d165; }
button:active { transform: scale(0.97); }

/* Search */
.search-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-wrap input {
  width: 100%;
  padding-left: 2.5rem;
  font-size: 1rem;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
}

/* Stats */
.stats {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.stats strong { color: var(--accent); }

/* List */
#list { display: flex; flex-direction: column; gap: 0.5rem; }

.item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: fadeIn 0.2s ease;
  transition: border-color 0.2s;
}

.item:hover { border-color: #3e3b33; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.item-icon {
  width: 36px;
  height: 36px;
  background: var(--bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.item-info { flex: 1; min-width: 0; }

.item-thing {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-place {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent2);
  margin-top: 0.15rem;
}

.item-place::before { content: "📍 "; }

.item-date {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  flex-shrink: 0;
}

.btn-delete {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.btn-delete:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
}

.empty span { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }

@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .form-row button { grid-column: 1 / -1; }
  .item-date { display: none; }
}
