* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  background-color: #121212;
  color: #e8eaed;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  font-size: 2.5rem;
  color: #4285f4;
  font-weight: 500;
  margin-bottom: 16px;
}

body.dark-mode h1 {
  color: #5c9aff;
}

.header-controls {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-label {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  background-color: #ccc;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.toggle-icon {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: white;
  transition: transform 0.3s;
}

.toggle-input {
  display: none;
}

.toggle-input:checked + .toggle-label {
  background-color: #4285f4;
}

body.dark-mode .toggle-input:checked + .toggle-label {
  background-color: #5c9aff;
}

.toggle-input:checked + .toggle-label .toggle-icon {
  transform: translateX(20px);
}

.toggle-text {
  font-size: 14px;
  color: #5f6368;
}

body.dark-mode .toggle-text {
  color: #9aa0a6;
}

.search-container {
  margin-bottom: 30px;
}

#search-input {
  width: 100%;
  padding: 14px 20px;
  font-size: 18px;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  outline: none;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.08);
  transition: box-shadow 0.2s, border-color 0.2s, background-color 0.3s, color 0.3s;
  background-color: #fff;
  color: #333;
}

body.dark-mode #search-input {
  background-color: #1e1e1e;
  color: #e8eaed;
  border-color: #383838;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

#search-input:focus {
  box-shadow: 0 1px 8px rgba(32, 33, 36, 0.2);
  border-color: rgba(223, 225, 229, 0);
}

body.dark-mode #search-input:focus {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
  border-color: #5c9aff;
}

.search-stats {
  margin-top: 10px;
  color: #70757a;
  font-size: 14px;
  padding-left: 16px;
}

body.dark-mode .search-stats {
  color: #9aa0a6;
}

.context-filters {
  margin-top: 15px;
  margin-bottom: 15px;
}

.context-title {
  color: #5f6368;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  padding-left: 16px;
}

body.dark-mode .context-title {
  color: #9aa0a6;
}

.context-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 16px;
}

.context-item {
  display: inline-block;
  background-color: #e8f0fe;
  color: #333333;
  font-size: 14px;
  font-weight: 500;
  padding: 5px 12px 5px 28px;
  border-radius: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  border: none;
  outline: none;
  position: relative;
}

body.dark-mode .context-item {
  background-color: rgba(92, 154, 255, 0.15);
  color: #ffffff;
}

.context-item::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border: 2px solid #1a73e8;
  border-radius: 50%;
  background-color: transparent;
  transition: background-color 0.2s;
}

body.dark-mode .context-item::before {
  border-color: #5c9aff;
}

.context-item.selected {
  background-color: #d2e3fc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.dark-mode .context-item.selected {
  background-color: rgba(92, 154, 255, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.context-item.selected::before {
  background-color: #1a73e8;
}

body.dark-mode .context-item.selected::before {
  background-color: #5c9aff;
}

.context-item-count {
  font-size: 12px;
  margin-left: 4px;
  opacity: 0.8;
  color: #333333;
}

body.dark-mode .context-item-count {
  color: #ffffff;
  opacity: 0.9;
}

.recent-searches {
  margin-top: 15px;
  margin-bottom: 25px;
}

.recent-title {
  color: #5f6368;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  padding-left: 16px;
}

.recent-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-item {
  display: inline-block;
  background-color: #e8f0fe;
  color: #1a73e8;
  font-size: 14px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  border: none;
  outline: none;
}

.recent-item:hover {
  background-color: #d2e3fc;
}

.results-container {
  margin-top: 20px;
}

.result-item {
  background-color: white;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, background-color 0.3s, box-shadow 0.3s;
}

body.dark-mode .result-item {
  background-color: #1e1e1e;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.result-title {
  font-size: 18px;
  font-weight: 500;
  color: #1a73e8;
  margin-bottom: 4px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.dark-mode .result-title {
  color: #5c9aff;
}

.result-title::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231a73e8'%3E%3Cpath d='M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.2s;
}

.result-item.expanded .result-title::after {
  transform: rotate(180deg);
}

.result-address {
  font-family: monospace;
  color: #34a853;
  font-size: 14px;
  margin-bottom: 8px;
}

.result-description {
  font-size: 14px;
  color: #5f6368;
}

body.dark-mode .result-description {
  color: #e0e0e0;
}

.result-function {
  background-color: #f1f3f4;
  border-radius: 4px;
  padding: 2px 6px;
  margin-right: 4px;
  margin-bottom: 4px;
  display: inline-block;
  font-family: monospace;
  font-size: 13px;
}

body.dark-mode .result-function {
  background-color: #2d2d2d;
  color: #e0e0e0;
}

.expanded-content {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e8eaed;
}

.result-item.expanded .expanded-content {
  display: block;
}

.abi-container {
  position: relative;
  margin-top: 16px;
}

.abi-title {
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copy-btn {
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.copy-btn:hover {
  background-color: #1558c4;
}

.code-block {
  background-color: #f8f9fa;
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 12px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.5;
  max-height: 400px;
  overflow-y: auto;
  transition: background-color 0.3s, border-color 0.3s;
}

body.dark-mode .code-block {
  background-color: #2d2d2d;
  border-color: #383838;
}

.code-block pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.highlight {
  background-color: #e8f0fe;
  padding: 0 1px;
}

.no-results {
  text-align: center;
  padding: 20px;
  color: #5f6368;
  font-size: 16px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #323232;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.toast.show {
  opacity: 1;
  visibility: visible;
}

.context-badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 8px;
}

body.dark-mode .context-badge {
  color: #f0f0f0 !important;
}

.description-container {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8eaed;
}

body.dark-mode .description-container {
  border-bottom-color: #383838;
}

.description-container h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #5f6368;
}

body.dark-mode .description-container h3 {
  color: #9aa0a6;
}

.description-container p {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}

body.dark-mode .description-container p {
  color: #e0e0e0;
}

.function-signatures-container {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8eaed;
}

body.dark-mode .function-signatures-container {
  border-bottom-color: #383838;
}

.function-signatures-container h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #5f6368;
}

body.dark-mode .function-signatures-container h3 {
  color: #9aa0a6;
}

.function-signature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.signature-item {
  background-color: #f1f3f4;
  border-radius: 4px;
  padding: 4px 8px;
  font-family: monospace;
  font-size: 13px;
  display: inline-block;
}

body.dark-mode .signature-item {
  background-color: #2d2d2d;
}

.hidden {
  display: none;
}

/* JSON Syntax Highlighting */
.json-key {
  color: #2e7d32;
}

body.dark-mode .json-key {
  color: #4caf50;
}

.json-string {
  color: #d32f2f;
}

body.dark-mode .json-string {
  color: #f44336;
}

.json-number {
  color: #1565c0;
}

body.dark-mode .json-number {
  color: #2196f3;
}

.json-boolean {
  color: #6200ea;
}

body.dark-mode .json-boolean {
  color: #b388ff;
}

.json-null {
  color: #827717;
}

body.dark-mode .json-null {
  color: #cddc39;
}

.json-bracket {
  color: #e65100;
}

body.dark-mode .json-bracket {
  color: #ff9800;
}

.json-comma {
  color: #616161;
}

body.dark-mode .json-comma {
  color: #9e9e9e;
}

/* Footer styles */
.site-footer {
  margin-top: 30px;
  padding: 15px 0;
  text-align: center;
  font-size: 14px;
  color: #5f6368;
  border-top: 1px solid #e8eaed;
}

body.dark-mode .site-footer {
  color: #9aa0a6;
  border-top: 1px solid #383838;
}

.site-footer a {
  color: #4285f4;
  text-decoration: none;
}

body.dark-mode .site-footer a {
  color: #5c9aff;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Badge styles */
.badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.network-badge, .context-badge, .tag-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.network-badge {
  color: white;
  font-weight: 600;
}

.katana-badge {
  background-color: #ff6b6b;
  border: 1px solid #ff5252;
}

.tatara-badge {
  background-color: #4ecdc4;
  border: 1px solid #26a69a;
}

.bokuto-badge {
  background-color: #45b7d1;
  border: 1px solid #2196f3;
}

.context-badge {
  /* Context badge styles are set dynamically based on theme */
  font-weight: 500;
  text-transform: lowercase;
}

.tag-badge {
  background-color: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
  font-weight: normal;
  text-transform: none;
}

body.dark-mode .tag-badge {
  background-color: #2d2d2d;
  color: #bbb;
  border: 1px solid #444;
}

/* Origin addresses styling */
.origin-addresses {
  margin-top: 8px;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  font-size: 13px;
}

body.dark-mode .origin-addresses {
  background-color: #2d2d2d;
}

/* Chain filter styles */
.chain-filters {
  margin-bottom: 20px;
}

.chain-title {
  font-size: 14px;
  font-weight: 500;
  color: #5f6368;
  margin-bottom: 8px;
}

body.dark-mode .chain-title {
  color: #9aa0a6;
}

.chain-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chain-filter-item {
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #e8eaed;
  min-width: 80px;
  justify-content: center;
}

.chain-filter-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chain-filter-item.selected {
  background-color: #1a73e8 !important;
  color: white !important;
  border-color: #1a73e8 !important;
}

body.dark-mode .chain-filter-item {
  border-color: #444;
}

body.dark-mode .chain-filter-item:hover {
  box-shadow: 0 2px 8px rgba(255,255,255,0.1);
}

/* Address link styles */
.address-link {
  color: #34a853;
  text-decoration: none;
  font-family: monospace;
  transition: color 0.2s ease;
}

.address-link:hover {
  color: #137333;
  text-decoration: underline;
}

body.dark-mode .address-link {
  color: #81c995;
}

body.dark-mode .address-link:hover {
  color: #a8e6ba;
}

.address-text {
  font-family: monospace;
  color: #34a853;
}

body.dark-mode .address-text {
  color: #81c995;
} 