:root {
  --primary: #007bff;
  --secondary: #6c757d;
  --text: #212529;
  --border: #dee2e6;
  --bg-card: #ffffff;
  --error: #dc3545;
}

.loto-special-charts-wrapper {
  margin: 20px 0;
  width: 100%;
  box-sizing: border-box;
}

.loto-charts-filter {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
}

.loto-filter-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  width: 100%;
}

.loto-filter-group {
  display: flex;
  align-items: center;
}
.loto-filter-group label {
  margin-right: 10px;
  font-weight: 600;
  color: var(--text, #212529);
}
.loto-filter-group select,
.loto-date-input {
  padding: 5px 10px;
  border: 1px solid var(--border, #dee2e6);
  border-radius: 4px;
  background-color: var(--bg-card, #ffffff);
  color: var(--text, #212529);
}

.loto-btn {
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.loto-btn-primary {
  color: #fff;
  background-color: var(--primary, #007bff);
  border-color: var(--primary, #007bff);
}
.loto-btn-primary:hover {
  filter: brightness(0.95);
}
.loto-btn-secondary {
  color: #fff;
  background-color: var(--secondary, #6c757d);
  border-color: var(--secondary, #6c757d);
}
.loto-btn-secondary:hover {
  filter: brightness(0.95);
}
.loto-filter-error {
  color: var(--error, #dc3545);
  font-size: 14px;
  margin-top: 5px;
  width: 100%;
  text-align: right;
}

.loto-charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  transition: opacity 0.2s ease;
}
.loto-chart-item {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #dee2e6);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}
.loto-chart-item h2 {
  font-size: 16px;
  text-align: center;
  margin-bottom: 15px;
  color: var(--text, #212529);
  font-weight: 600;
}
.chart-container {
  position: relative;
  height: 250px;
  width: 100%;
  flex-grow: 1;
}

@media (max-width: 992px) {
  .loto-charts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .loto-charts-grid { grid-template-columns: 1fr; }
  .loto-filter-row { justify-content: space-between; }
  .loto-filter-group { width: 100%; justify-content: space-between; margin-bottom: 10px; }
  .loto-filter-group input, .loto-filter-group select { width: 60%; }
  .loto-filter-actions { width: 100%; display: flex; justify-content: space-between; gap: 10px; }
  .loto-btn { flex: 1; }
  .chart-container { height: 220px; }
  .loto-chart-item canvas { max-width: 100% !important; height: auto !important; }
  .loto-chart-item h2 { text-align: center; }
}

.loto-stats-container {
  margin-top: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-top: 1px solid var(--border, #dee2e6);
  padding-top: 10px;
}
.loto-stat-item {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}
.loto-stat-label { font-weight: 600; color: var(--text, #212529); }
.loto-stat-count { color: var(--secondary, #6c757d); font-size: 12px; }
.loto-count-val { color: var(--error, #dc3545); font-weight: 700; font-size: 14px; }
@media (max-width: 576px) {
  .loto-stats-container { gap: 5px; }
  .loto-stat-item { font-size: 11px; padding: 4px 8px; }
  .loto-count-val { font-size: 13px; }
}

