/* Base Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: #fafafa;
  color: #111;
}

#header {
  padding: 1.5rem;
  font-size: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #eee;
  text-align: center;
  color: #444;
}

/* Search Area */
.search {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#search {
  border: none;
  border-bottom: 2px solid #222;
  padding: 0.75rem 0.5rem;
  font-size: 1.1rem;
  width: 30%;
  min-width: 280px;
  outline: none;
  background: transparent;
  transition: border-color 0.2s ease;
}

#search:focus {
  border-bottom: 2px solid #0066cc;
}

/* Master Layout Container */
.container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 95%;
  height: 68vh;
  margin: 0 auto;
}

.container .left,
.container .middle,
.container .right {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex: 1 1 300px;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.container h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #718096;
  margin-bottom: 16px;
  font-weight: 600;
  text-align: left;
}

/* Scroll Isolation Mechanics across Columns */
.scrollable-zone {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 4px;
}

/* Minimal Custom Scrollbar rules */
.scrollable-zone::-webkit-scrollbar {
  width: 4px;
}

.scrollable-zone::-webkit-scrollbar-thumb {
  background-color: #e2e8f0;
  border-radius: 2px;
}

/* LEFT COLUMN: Tags */
/* LEFT COLUMN: Tags layout updated to wrap items side-by-side */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.tag {
  display: inline-block;
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: monospace;
  color: #2d3748;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag:hover {
  background: #1a202c;
  color: #ffffff;
  border-color: #1a202c;
}

/* Left Pinned Input controls at footer */
#add-words {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
}

#add-words input {
  flex-grow: 1;
  padding: 10px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
}

#add-words input:focus {
  border-color: #1a202c;
}

#add-words button {
  padding: 10px 16px;
  background-color: #1a202c;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
}

#add-words button:hover {
  background-color: #4a5568;
}

/* MIDDLE COLUMN: Matches view format */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
