/* Base styles */
body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, sans-serif;
  background: #121212;
  color: #e0e0e0;
  line-height: 1.6;
}

/* Layout container */
.container {
  max-width: 960px;
  margin: auto;
  padding: 20px 20px;
}

/* File upload row */
.file-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

/* Unified button + label styling */
button,
.button-like {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #2a2a2a;
  color: #fff;
  cursor: pointer;
  font-size: 0.95em;
  font-family: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  user-select: none;
}

button:hover,
.button-like:hover {
  background: #444;
}

#toggleTypeDropdown:hover {
  background: #2a2a2a;
}

#resetApp {
  color: #ff5252;
}

/* Hide native file input */
input[type="file"] {
  display: none;
}

/* Search bar */
.search-bar-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

input[type="search"] {
  flex: 1;
  background: #1e1e1e;
  color: #e0e0e0;
  padding: 10px 12px;
  border: 1px solid #444;
  border-radius: 6px;
  transition: border 0.2s ease;
}

input[type="search"]:focus {
  border-color: #888;
  outline: none;
}

/* Filters – horizontal and compact */
.filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.85em;
}

.filters input,
.filters select {
  background: #1e1e1e;
  color: #fff;
  padding: 4px 8px;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 0.85em;
  width: 160px;
  height: 32px;
  box-sizing: border-box;
}

/* Strategy checkboxes - horizontal, bold, aligned */
.strategy-checkboxes {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 10px;
}

.strategy-checkboxes label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85em;
  font-weight: bold;
  line-height: 1;
  white-space: nowrap;
  height: 16px;
}

.strategy-checkboxes input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #007bff;
}

/* Dropdown styles */
.type-filter-dropdown {
  position: relative;
}

.type-filter-dropdown button {
  display: flex;
  align-items: center;
  gap: 80px;
  border-radius: 6px;
  background: #2a2a2a;
  padding: 10px;
  color: #fff;
  border: none;
  cursor: pointer;
}

.type-filter-dropdown button:hover {
  background: #444;
}

#typeArrow {
  font-size: 0.85em;
}

#typeCheckboxes {
  position: absolute;
  top: 110%;
  left: 0;
  background: #1e1e1e;
  padding: 12px;
  border: 1px solid #444;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

#typeCheckboxes.hidden {
  display: none;
}

#typeCheckboxes label {
  margin-bottom: 2px;
  font-size: 0.9em;
}

#typeCheckboxes .type-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

#typeCheckboxes .type-controls button {
  padding: 6px 6px;
  font-size: 0.85em;
  border-radius: 6px;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
  cursor: pointer;
}

#typeCheckboxes .type-controls button:hover {
  background: #3a3a3a;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  font-size: 0.9em;
}

th, td {
  padding: 6px 10px;
  text-align: left;
}

th {
  background: #222;
  color: #fff;
  font-weight: 600;
  user-select: none;
  cursor: pointer;
  border-bottom: 1px solid #444;
}

th.sorted-asc::after {
  content: ' ▲';
}

th.sorted-desc::after {
  content: ' ▼';
}

tbody tr:nth-child(even) {
  background-color: #1e1e1e;
}

tbody tr:nth-child(odd) {
  background-color: #292929;
}

/* Bold card names */
#dropsTable tbody td:first-child {
  font-weight: bold;
}

/* Opponent image and type icon (no rounded corners) */
.opponent-cell img,
.type-icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  border-radius: 0;
  vertical-align: middle;
}

/* Utility */
.hidden {
  display: none !important;
}
