* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f8f9fa;
  color: #212529;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  margin: 0 -20px 40px;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-logo {
  font-size: 1.85rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.8px;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
}

.nav-logo:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.nav-logo::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transition: width 0.3s ease;
}

.nav-logo:hover::after {
  width: 100%;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: #495057;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  position: relative;
  padding: 10px 16px;
  border-radius: 8px;
  background: transparent;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(29, 78, 216, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nav-link:hover {
  color: #2563eb;
  transform: translateY(-1px);
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link.active {
  color: #2563eb;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(29, 78, 216, 0.1) 100%);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 2px 2px 0 0;
}

/* Views */
.view {
  display: block;
  animation: fadeIn 0.3s ease;
}

.view.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
header {
  text-align: center;
  padding: 50px 0 30px;
  margin-bottom: 40px;
}

h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1a1a1a;
  letter-spacing: -1px;
  line-height: 1.2;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #212529;
  line-height: 1.3;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: #343a40;
}

p {
  line-height: 1.7;
  color: #495057;
  margin-bottom: 16px;
}

ul, ol {
  margin-left: 24px;
  margin-bottom: 16px;
}

li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Landing Page */
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: #2563eb;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.5rem;
  color: #212529;
}

.card p {
  flex-grow: 1;
  margin-bottom: 20px;
  color: #6c757d;
}

.card-link {
  text-decoration: none;
  color: #2563eb;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.card-link:hover {
  color: #1d4ed8;
  gap: 10px;
}

/* Textarea */
textarea {
  width: 100%;
  min-height: 240px;
  padding: 16px;
  font-size: 16px;
  line-height: 1.6;
  border-radius: 12px;
  border: 2px solid #dee2e6;
  resize: vertical;
  outline: none;
  font-family: inherit;
  background: #ffffff;
  color: #212529;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 2px 8px rgba(0,0,0,0.08);
}

textarea::placeholder {
  color: #adb5bd;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.stat-box {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.stat-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: #2563eb;
}

.stat-box span {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 8px;
  line-height: 1;
}

.stat-box small {
  color: #6c757d;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Buttons */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-family: inherit;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-clear {
  background: #dc3545;
  color: #fff;
}

.btn-clear:hover {
  background: #c82333;
}

.btn-copy {
  background: #2563eb;
  color: #fff;
}

.btn-copy:hover {
  background: #1d4ed8;
}

.btn-paste {
  background: #28a745;
  color: #fff;
}

.btn-paste:hover {
  background: #218838;
}

/* Info Sections */
.info {
  margin-top: 48px;
  background: #ffffff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #e9ecef;
}

.info h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #212529;
  font-size: 1.75rem;
}

.info h3 {
  margin-top: 28px;
  margin-bottom: 12px;
  color: #343a40;
  font-size: 1.25rem;
}

.info p {
  color: #495057;
  margin-bottom: 16px;
}

.info ul {
  margin-left: 24px;
  margin-bottom: 20px;
}

.info li {
  color: #495057;
  margin-bottom: 10px;
}

/* Privacy Note */
.privacy-note {
  margin-top: 12px;
  font-size: 0.875rem;
  color: #6c757d;
  font-style: italic;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #2563eb;
}

/* Footer */
footer {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 2px solid #e9ecef;
  font-size: 0.9rem;
  color: #6c757d;
  text-align: center;
  background: #ffffff;
  padding: 32px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

footer p {
  margin-bottom: 8px;
  color: #6c757d;
}

footer a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Section Styling */
section {
  margin-bottom: 32px;
}

section h2 {
  margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 16px 32px;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    margin: 0 -16px 30px;
  }

  .nav-logo {
    font-size: 1.65rem;
    width: 100%;
    text-align: left;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
  }

  .nav-link {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  header {
    padding: 30px 0 20px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .tools {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card {
    padding: 24px;
  }

  textarea {
    min-height: 180px;
    padding: 14px;
  }

  .stats {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }

  .stat-box {
    padding: 20px 16px;
  }

  .stat-box span {
    font-size: 28px;
  }

  .info {
    padding: 24px;
  }

  .buttons {
    width: 100%;
  }

  button {
    flex: 1;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  .stat-box span {
    font-size: 24px;
  }

  .stat-box small {
    font-size: 0.75rem;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
textarea:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Selection Color */
::selection {
  background: #2563eb;
  color: #fff;
}

::-moz-selection {
  background: #2563eb;
  color: #fff;
}
