/* Humanize Web - Clean, Modern Design */

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-hover: #1a1a25;
  --border: #2a2a35;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --accent: #8b5cf6;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.tab:hover {
  background: var(--surface);
  color: var(--text);
}

.tab.active {
  background: var(--surface);
  color: var(--primary);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Input Section */
.input-section {
  margin-bottom: 1.5rem;
}

textarea {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
}

textarea::placeholder {
  color: var(--text-muted);
}

.button-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.primary-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.primary-btn:active {
  transform: translateY(0);
}

.secondary-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.secondary-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* Results */
.results {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.results.hidden {
  display: none;
}

/* Score Card */
.score-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--surface-hover);
  border: 3px solid var(--success);
  transition: border-color 0.3s;
}

.score-circle.low { border-color: var(--success); color: var(--success); }
.score-circle.medium { border-color: var(--warning); color: var(--warning); }
.score-circle.high { border-color: var(--danger); color: var(--danger); }

.score-label {
  flex: 1;
}

.score-label span {
  font-size: 1.25rem;
  font-weight: 600;
}

.score-label p {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Patterns List */
.patterns-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pattern-item {
  background: var(--bg);
  border-radius: 0.5rem;
  padding: 1rem;
}

.pattern-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.pattern-name {
  font-weight: 600;
  color: var(--primary);
}

.pattern-count {
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
}

.pattern-examples {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pattern-examples code {
  background: var(--surface);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.85em;
}

/* Stats Row */
.stats-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat span {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Output Section */
.output-section {
  margin-bottom: 1rem;
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.output-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.copy-btn {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.output-text {
  background: var(--bg);
  padding: 1rem;
  border-radius: 0.5rem;
  white-space: pre-wrap;
  line-height: 1.7;
}

/* Diff Section */
.diff-section {
  margin-top: 1rem;
}

.diff-section summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.5rem 0;
}

.diff-section summary:hover {
  color: var(--text);
}

#diff-output {
  background: var(--bg);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.diff-removed {
  background: rgba(239, 68, 68, 0.2);
  text-decoration: line-through;
  color: var(--danger);
}

.diff-added {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

/* About Section */
.about-content {
  line-height: 1.8;
}

.about-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.about-content h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--primary);
}

.about-content p {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.about-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.about-content li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.about-content a {
  color: var(--primary);
  text-decoration: none;
}

.about-content a:hover {
  text-decoration: underline;
}

.about-content .meta {
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Footer */
footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .tabs {
    flex-wrap: wrap;
  }
  
  .tab {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
  }
  
  .score-card {
    flex-direction: column;
    text-align: center;
  }
  
  .stats-row {
    justify-content: center;
  }
}

/* No patterns found message */
.no-patterns {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.no-patterns .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
