/* History Section */
.history-section {
  margin-top: 2rem;
}

.history-section h2 {
  margin-bottom: 1rem;
}

/* History Filters */
.history-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.history-filters select {
  padding: 0.5rem 1rem;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 180px;
}

.history-filters select:hover {
  border-color: var(--accent);
}

.history-filters select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* History List */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

 .history-item {
   display: flex;
   align-items: center;
   gap: 1rem;
   padding: 1.25rem 1.5rem !important;
   background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
   border: 1px solid rgba(255, 255, 255, 0.1);
   border-left: 4px solid var(--accent);
   border-radius: var(--radius);
   transition: all 0.2s ease;
   overflow: visible;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
 }

 .history-item:hover {
   border-color: var(--accent);
   border-left-color: var(--accent);
   transform: translateX(6px) scale(1.01);
   box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
   background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
 }

/* History Item Info */
.history-item-info {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

/* Nested div inside history-item-info */
.history-item-info > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

 /* Color Dot - Base */
.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Color Dot in History Items */
.history-item-info .color-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
}

/* History Item Date */
.history-item-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* History Item Time */
.history-item-time {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: monospace;
  font-weight: 600;
  white-space: nowrap;
  min-width: 80px;
}

/* History Item Achievement */
.history-item-achievement {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  min-width: 120px;
}

/* History Item Actions */
.history-item-actions {
  display: flex;
  gap: 0.5rem;
}

/* History Delete Button */
.history-delete-btn {
  padding: 0.4rem 0.8rem;
  background-color: var(--danger);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--card-bg);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-delete-btn:hover {
  background-color: #b91c35;
  transform: scale(1.05);
}

.history-deleted {
  opacity: 0.5;
  text-decoration: line-through;
}

/* Empty State */
.history-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Retro theme overrides */
[data-theme="retro"] .history-filters select {
  border-radius: 0;
  border-width: 2px;
  font-family: 'Courier New', monospace;
}

[data-theme="retro"] .history-item {
  border-radius: 0;
  border-width: 2px;
}

[data-theme="retro"] .history-item:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="retro"] .history-time {
  font-family: 'Courier New', monospace;
}

/* Leather theme overrides */
[data-theme="leather"] .history-filters select {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="leather"] .history-item {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="leather"] .history-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="leather"] .history-delete-btn {
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="leather"] .history-delete-btn:hover {
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
}