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

body {
  width: 360px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f8fafc;
  color: #1e293b;
}

.header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #1a56db 0%, #06b6d4 100%);
  color: #fff;
}

.logo,
.popup-logo {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 10px;
  object-fit: contain;
  aspect-ratio: 1 / 1;
}

.brand h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.tagline {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

.tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab:hover {
  color: #1a56db;
}

.tab.active {
  color: #1a56db;
  border-bottom-color: #1a56db;
}

.panel {
  display: none;
  padding: 16px 20px;
}

.panel.active {
  display: block;
}

.rate-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 12px;
  color: #64748b;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  color: #1a56db;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: #f1f5f9;
}

.converter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: #1a56db;
}

.input-group select {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  background: #fff;
  cursor: pointer;
  outline: none;
}

.swap-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #1a56db;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
}

.swap-btn:hover {
  background: #1648b8;
  transform: rotate(180deg);
}

.rate-detail {
  margin-top: 12px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: #1e293b;
  transition: all 0.2s;
}

.tool-card:hover {
  border-color: #1a56db;
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.12);
}

.tool-icon {
  font-size: 24px;
}

.tool-name {
  font-size: 12px;
  font-weight: 500;
}

.site-hint {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
}

.site-hint strong {
  color: #1a56db;
}

.footer {
  padding: 8px 20px 12px;
  text-align: center;
  font-size: 11px;
  color: #cbd5e1;
}
