/* style.css */

body {
    margin: 0;
    overflow: hidden;
    font-family: 'Roboto', sans-serif; /* Using Roboto from Google Fonts */
    color: #e0e0e0; /* Light gray for general text */
    background-color: #2c3e50; /* Dark, earthy background */
}

/* Three.js Canvas - ensure it fills the screen */
canvas {
    display: block;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

#ui-container {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(44, 62, 80, 0.85); /* Slightly transparent earthy tone, more opaque */
    padding: 20px;
    border-radius: 10px; /* Rounded corners for a softer look */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4); /* Stronger shadow */
    z-index: 10;
    border: 1px solid rgba(139, 69, 19, 0.6); /* Earthy brown border */
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between input groups */
    max-width: 380px; /* Limit width of the UI container */
}


#contains-search-input {
    border-color: #33cc33; /* Greenish */
}
#contains-search-input::placeholder {
    color: rgba(51, 204, 51, 0.6);
}


input:focus {
  outline: 2px solid #33ccff;
}

input[type="text"] {
  transition: outline 0.2s ease-in-out;
}


.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    color: #d2b48c; /* Tan for labels */
    font-size: 0.95em;
    margin-bottom: 3px;
}
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-family: 'Share Tech Mono', monospace;
  color: #00ffff;
  font-size: 14px;
}

input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #00ffff;
  border-radius: 4px;
  background-color: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease-in-out;
}

input[type="checkbox"]:checked {
  background-color: #00ffff;
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 9px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

input[type="checkbox"]:checked::after {
  opacity: 1;
}

input[type="checkbox"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


input[type="text"] {
    padding: 10px 15px;
    border: 2px solid; /* Border color defined per input type */
    border-radius: 20px; /* Pill-shaped input */
    background-color: #f5deb3; /* Wheat */
    color: #4a2b0a; /* Dark brown text */
    font-size: 1em;
    width: calc(100% - 34px); /* Full width minus padding and border */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    outline: none; /* Remove default focus outline */
    transition: border-color 0.2s ease, box-shadow 0.2s ease; /* Smooth transitions */
}

input[type="text"]:focus {
    border-color: #e0e0e0; /* Light gray border on focus */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 255, 255, 0.2);
}

/* Specific input border colors based on their role */
#positive-search-input {
    border-color: #00ffff; /* Cyan for positive search */
}
#negative-search-input {
    border-color: #ffaa00; /* Orange for 'starts with' exclusion */
}
#exact-exclusion-input {
    border-color: #ff0000; /* Red for exact exclusion */
}
#contains-exclusion-input {
    border-color: #9900ff; /* Purple for 'contains' exclusion */
}

/* Placeholder colors */
#positive-search-input::placeholder {
    color: rgba(0, 255, 255, 0.6);
}
#negative-search-input::placeholder {
    color: rgba(255, 170, 0, 0.6);
}
#exact-exclusion-input::placeholder {
    color: rgba(255, 0, 0, 0.6);
}
#contains-exclusion-input::placeholder {
    color: rgba(153, 0, 255, 0.6);
}


#selected-words-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed rgba(139, 69, 19, 0.3); /* Dashed earthy separator */
}

#selected-words-container p {
    margin: 0 0 8px 0;
    color: #d2b48c; /* Tan */
    font-size: 0.9em;
}

#active-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-word-tag {
    background-color: #6a053c; /* Deep berry/mushroom color */
    color: #ffe0b3; /* Light text on tag */
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.active-word-tag:hover {
    background-color: #8e074d; /* Lighter berry on hover */
    transform: translateY(-1px);
}

.active-word-tag .close-btn {
    margin-left: 8px;
    font-weight: bold;
    color: #ffc0cb; /* Pinkish for close */
    font-size: 1.1em;
    line-height: 1; /* Ensures vertical alignment */
}

.label {
  position: absolute;
  color: #ffffff;
  pointer-events: none;
  font-size: 14px;
  font-family: monospace;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  transition: transform 0.15s ease, color 0.2s ease;
}


.label.hovered {
  transform: scale(5.35); /* subtle zoom-in effect */
  font-weight: bold;
}


    #gloss-overlay {
  position: absolute;
  max-width: 300px;
  background: rgba(44, 62, 80, 0.95);
  color: #ffe;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95em;
  z-index: 999;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: auto;
  transition: opacity 0.3s ease;
}
