* {
  box-sizing: border-box;
  font-family: "Montserrat", system-ui, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f1f5f9;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 760px;
  padding: 16px;
}

.header {
  text-align: center;
  padding: 20px 0;
  border-bottom: 3px solid #2563eb;
  background: white;
  border-radius: 12px 12px 0 0;
}

.logo {
  max-width: 80%;
}

.mode-toggle-container {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.mode-button {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: white;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mode-button.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.mode-button i {
  margin-right: 8px;
}

.input-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 16px;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}

.btn {
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary { background: #2563eb; color: white; }
.secondary { background: #e5e7eb; color: #475569; }

.loading-message { text-align: center; margin: 20px 0; }
.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.results-info {
  margin-bottom: 12px;
  font-weight: 500;
  color: #64748b;
  font-size: 14px;
}

.results-container {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.result-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: transform 0.2s;
}

.result-card:hover { transform: translateY(-2px); }

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

.result-card strong { color: #1e40af; }
.result-card span { display: block; margin-top: 4px; }

mark {
  background: #fde047;
  color: #000;
  padding: 0 2px;
  border-radius: 2px;
}

.badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
}
.badge.exact { background: #dcfce7; color: #166534; }
.badge.partial { background: #fef9c3; color: #854d0e; }

.hidden { display: none !important; }

.footer {
  text-align: center;
  margin-top: 40px;
  padding-bottom: 20px;
  color: #94a3b8;
  font-size: 12px;
}

.legal-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 30px 0;
  text-align: center;
}

.legal-button {
  text-decoration: none;
  font-size: 14px;
  color: #2563eb;
  font-weight: 600;
}

.result-card.copied {
    outline: 2px solid #4caf50;
    background: #f0fff4;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
}

.hidden {
    display: none;
}
