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

body {
  background: #f3f4f6;
  color: #111827;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
}

.ad-banner-top {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 15px;
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ad-placeholder {
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 999px;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.nav {
  margin-bottom: 24px;
}

.nav a {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.nav a:hover {
  color: #111827;
}

.header {
  margin-bottom: 32px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e5f2ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.header h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.header p {
  color: #4b5563;
  font-size: 1rem;
}

.tool-section {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.char-counter {
  float: right;
  font-size: 0.85rem;
  color: #6b7280;
}

.char-counter.warning {
  color: #f59e0b;
}

.char-counter.error {
  color: #ef4444;
}

input[type="text"],
input[type="url"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s;
}

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

textarea {
  resize: vertical;
  min-height: 80px;
}

.help-text {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 6px;
}

.preview-section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.preview-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.serp-preview {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  font-family: Arial, sans-serif;
}

.serp-url {
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.serp-favicon {
  width: 16px;
  height: 16px;
  background: #e5e7eb;
  border-radius: 50%;
  display: inline-block;
}

.serp-title {
  font-size: 20px;
  color: #1a0dab;
  margin-bottom: 4px;
  line-height: 1.3;
  word-break: break-word;
}

.serp-description {
  font-size: 14px;
  color: #4d5156;
  line-height: 1.6;
  word-break: break-word;
}

.serp-empty {
  color: #9ca3af;
  font-style: italic;
}

.tips-section {
  margin-top: 20px;
  padding: 16px;
  background: #eff6ff;
  border-left: 3px solid #2563eb;
  border-radius: 8px;
}

.tips-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1d4ed8;
}

.tips-section ul {
  margin-left: 20px;
  font-size: 0.9rem;
  color: #374151;
}

.tips-section li {
  margin-bottom: 4px;
}

.ad-banner-bottom {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 20px;
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  width: 100%;
}

.footer {
  margin-top: 12px;
  font-size: 0.78rem;
  color: #9ca3af;
  text-align: center;
}

@media (max-width: 768px) {
  .page {
    padding: 24px 16px;
  }

  .header h1 {
    font-size: 1.6rem;
  }

  .tool-section {
    padding: 20px;
  }
}
