:root {
  --bg: #ffffff;
  --text: #111111;
  --accent: #1976d2;
  --button: #e0e0e0;
  --button-active: #1976d2;
  --button-text: #000000;
}

body.dark {
  --bg: #121212;
  --text: #ffffff;
  --accent: #90caf9;
  --button: #2c2c2c;
  --button-text: #ffffff;
}

body {
  margin: 0;
  font-family: sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: all 0.3s ease;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #ccc;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  height: 40px;
  width: auto;
}

h1 {
  font-size: 1.5rem;
  margin: 0;
}

.sticky-controls {
  position: sticky;
  top: 70px;
  background-color: var(--bg);
  z-index: 9;
  padding: 0.5rem 1rem 1rem;
  border-bottom: 1px solid #ccc;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.button-group button {
  padding: 0.5rem 1rem;
  border: none;
  background: var(--button);
  color: var(--button-text);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.button-group button.active {
  background: var(--button-active);
  color: #fff;
}

#searchInput {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

#resultTable {
  padding: 1rem;
  overflow-x: auto;
}

.result-block {
  margin-bottom: 2rem;
}

.result-block h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
}

th, td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 2rem auto;
  border: 5px solid #ccc;
  border-top: 5px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#darkToggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent);
  border: none;
  color: white;
  border-radius: 50%;
  padding: 12px;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .app-header h1 {
    font-size: 1.2rem;
  }

  .logo {
    height: 30px;
  }

  th, td {
    font-size: 0.9rem;
  }
}
