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

body {
  width: 360px;
  min-height: 200px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  background: #0b0b0f;
  color: #e0e0e0;
}

.view {
  display: none;
  padding: 16px;
}

.view.active {
  display: block;
}

h1 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #fff;
}

h2 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

label {
  display: block;
  font-size: 11px;
  color: #666;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #1e2030;
  border-radius: 6px;
  background: #12141e;
  color: #e0e0e0;
  font-size: 13px;
  outline: none;
  margin-bottom: 12px;
}

input[type="text"]:focus {
  border-color: #1a8cff;
}

button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

button.primary {
  background: #1a8cff;
  color: #fff;
}

button.primary:hover {
  background: #1577dd;
}

button.primary:disabled {
  background: #333;
  cursor: not-allowed;
}

button.danger {
  background: transparent;
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.3);
  margin-top: 12px;
}

button.danger:hover {
  background: rgba(255, 107, 107, 0.08);
}

.link-btn {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(26, 140, 255, 0.3);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: #1a8cff;
  background: transparent;
  transition: background 0.15s;
}

.link-btn:hover {
  background: rgba(26, 140, 255, 0.08);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot.green {
  background: #4ade80;
}

.status-dot.red {
  background: #ff6b6b;
}

.status-dot.yellow {
  background: #fbbf24;
}

.error-text {
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 4px;
}

.success-text {
  color: #4ade80;
  font-size: 12px;
  margin-top: 4px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #1e2030;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: #666;
  font-size: 12px;
}

.info-value {
  color: #fff;
  font-size: 12px;
  font-family: "SF Mono", "Fira Code", monospace;
}

#wallet-list {
  max-height: 275px;
  overflow-y: auto;
}

#wallet-list::-webkit-scrollbar {
  width: 4px;
}

#wallet-list::-webkit-scrollbar-track {
  background: transparent;
}

#wallet-list::-webkit-scrollbar-thumb {
  background: #1e2030;
  border-radius: 4px;
}

.wallet-card {
  background: #12141e;
  border: 1px solid #1e2030;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.wallet-pubkey {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 11px;
  color: #666;
  word-break: break-all;
}

.wallet-balance {
  font-size: 16px;
  font-weight: 600;
  color: #4ade80;
  margin-top: 4px;
}

.wallet-status {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

.section {
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.section-header h2 {
  margin-bottom: 0;
}

.wallet-count-link {
  font-size: 12px;
  color: #555;
  cursor: pointer;
  transition: color 0.15s;
}

.wallet-count-link:hover {
  color: #1a8cff;
}

.shark-logo {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.btn-outline {
  background: transparent;
  border: 1px solid #1e2030;
  color: #e0e0e0;
  cursor: pointer;
  transition: border-color 0.15s;
}

.btn-outline:hover {
  border-color: #1a8cff;
  color: #1a8cff;
}

.preset-picker {
  position: relative;
}

.preset-picker-btn {
  display: flex !important;
  align-items: center;
  gap: 4px;
  width: auto !important;
  padding: 4px 8px !important;
  background: #12141e !important;
  border: 1px solid #1e2030 !important;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s;
  white-space: nowrap;
}

.preset-picker-btn:hover {
  border-color: #1a8cff !important;
}

#preset-picker-emoji {
  font-size: 13px;
}

#preset-picker-label {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  max-height: 240px;
  overflow-y: auto;
  background: #12141e;
  border: 1px solid #1e2030;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 100;
  padding: 4px;
}

.preset-dropdown-item {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: 100% !important;
  padding: 8px 10px !important;
  background: none !important;
  border: none !important;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.preset-dropdown-item:hover {
  background: #1e2030 !important;
}

.preset-dropdown-item.active {
  background: rgba(26, 140, 255, 0.1) !important;
  color: #1a8cff;
}

.preset-dropdown-item .dd-emoji {
  font-size: 14px;
  flex-shrink: 0;
}

.preset-dropdown-item .dd-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-dropdown-item .dd-check {
  color: #1a8cff;
  font-size: 12px;
  flex-shrink: 0;
}

.preset-dropdown-empty {
  padding: 12px;
  text-align: center;
  color: #555;
  font-size: 12px;
}

.region-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.region-btn {
  flex: 1;
  width: auto !important;
  padding: 7px 10px !important;
  background: #12141e !important;
  border: 1px solid #1e2030 !important;
  border-radius: 6px;
  color: #666;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.region-btn:hover {
  border-color: #333 !important;
  color: #aaa;
}

.region-btn.active {
  border-color: #1a8cff !important;
  color: #1a8cff;
  background: rgba(26, 140, 255, 0.08) !important;
}

.region-badge {
  position: relative;
  font-size: 10px;
  font-weight: 600;
  color: #1a8cff;
  background: rgba(26, 140, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  cursor: default;
}

.region-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1e2030;
  color: #ccc;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  padding: 5px 8px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 50;
}

.region-badge:hover::after {
  opacity: 1;
}
