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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f5f7fa;
  color: #1f2933;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #d8dee6;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.nav-inner {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.top-nav .brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 1rem;
  font-weight: 600;
  color: #52606d;
  text-decoration: none;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover {
  color: #2563eb;
}

.nav-links a.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.site-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 32px 16px 0;
}

.site-header h1 {
  font-size: 2rem;
  color: #2563eb;
}

.tagline {
  margin-top: 6px;
  color: #52606d;
  font-size: 0.95rem;
}

.app {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 16px;
}

.content {
  width: 100%;
  max-width: 800px;
  margin-top: 48px;
  padding: 0 16px;
  text-align: left;
}

.about-content {
  width: 100%;
  max-width: 800px;
  padding: 32px 16px 0;
  text-align: left;
}

.content h2,
.about-content h2 {
  font-size: 1.5rem;
  color: #1f2933;
  margin-bottom: 12px;
  padding-top: 16px;
}

.about-content h2.subheading {
  font-size: 1.15rem;
  color: #52606d;
  padding-top: 0;
  margin-bottom: 20px;
}

.content h3,
.about-content h3 {
  font-size: 1.15rem;
  color: #1f2933;
  margin: 24px 0 10px;
}

.about-content h1 {
  font-size: 2rem;
  color: #2563eb;
  margin-bottom: 16px;
}

.content p,
.about-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: #3e4c59;
  margin-bottom: 12px;
}

.content ul,
.about-content ul {
  margin: 0 0 16px 20px;
}

.content li,
.about-content li {
  font-size: 1rem;
  line-height: 1.7;
  color: #3e4c59;
  margin-bottom: 8px;
}

.editor {
  position: relative;
  display: flex;
}

.editor textarea {
  width: 100%;
  flex: 1;
  min-height: 320px;
  resize: vertical;
  padding: 16px 16px 56px;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.6;
  color: #1f2933;
  background: #fff;
  border: 2px solid #cbd2d9;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.split-editor {
  width: 100%;
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.split-editor .editor {
  flex: 1;
}

.split-editor .editor textarea {
  min-height: 420px;
}

.hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #52606d;
}

.editor-toolbar {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  gap: 8px;
}

.editor-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2933;
  background: #fff;
  border: 1px solid #cbd2d9;
  border-radius: 7px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
  -webkit-tap-highlight-color: transparent;
}

.editor-btn:hover {
  background: #eef2f7;
  border-color: #9aa5b1;
}

.editor-btn:active {
  transform: scale(0.95);
}

.editor-btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.editor-btn .icon {
  flex-shrink: 0;
}

.editor-btn.copied {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
}

#text-input:focus,
.split-editor textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn {
  flex: 1;
  min-height: 48px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: #e4e7eb;
  color: #1f2933;
  transition: background 0.15s ease, transform 0.05s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: #d1d5db;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.site-footer {
  width: 100%;
  max-width: 800px;
  margin-top: 48px;
  padding: 24px 16px;
  border-top: 1px solid #d8dee6;
  font-size: 0.9rem;
  color: #52606d;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid #d8dee6;
  margin-bottom: 16px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 140px;
}

.footer-col a {
  color: #52606d;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 12px;
  text-align: center;
}

.footer-bottom a {
  color: #52606d;
  text-decoration: underline;
  font-weight: 500;
}

.footer-bottom a:hover {
  color: #2563eb;
}

.footer-bottom .sep {
  margin: 0 8px;
  color: #9aa5b1;
}

@media (max-width: 720px) {
  .split-editor {
    flex-direction: column;
  }

  .split-editor .editor textarea {
    min-height: 320px;
  }
}

@media (max-width: 480px) {
  .site-header h1 {
    font-size: 1.6rem;
  }

  .top-nav .brand {
    font-size: 1rem;
  }

  .nav-links {
    gap: 16px;
  }

  #text-input {
    min-height: 260px;
  }

  .btn {
    padding: 12px 12px;
  }
}
