/* Project ATLAS - Site #15: Wortzähler Online (German) */
:root {
  --bg-primary: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #1e293b;
  --border-subtle: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-amber: #f59e0b;
  --accent-amber-hover: #d97706;
  --accent-blue: #38bdf8;
  --accent-emerald: #10b981;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Header */
header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  color: var(--accent-amber);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

nav a:hover {
  color: var(--accent-amber);
}

/* Hero Section */
.tool-section {
  padding: 2.5rem 0;
  background: radial-gradient(circle at 50% 15%, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
}

.tool-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 2rem;
}

.badge-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.tool-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.tool-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Stats Counter Grid */
.stats-counter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* Main Workspace Card */
.workspace-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  margin-bottom: 2rem;
}

.text-editor {
  width: 100%;
  min-height: 380px;
  background: #080c16;
  border: none;
  padding: 1.5rem;
  color: #f1f5f9;
  font-size: 1.05rem;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  font-family: inherit;
}

.text-editor::placeholder {
  color: #475569;
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: #0b1120;
  border-top: 1px solid var(--border-subtle);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn:hover {
  background: #334155;
  border-color: #64748b;
}

.btn-primary {
  background: var(--accent-amber);
  color: #090d16;
  border-color: var(--accent-amber);
}

.btn-primary:hover {
  background: var(--accent-amber-hover);
  border-color: var(--accent-amber-hover);
}

.btn-danger {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.25);
}

/* Extra Insights Grid (Readability & Keyword Density) */
.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.insight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.5rem;
}

.insight-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flesch-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.density-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.density-table th {
  text-align: left;
  padding: 0.5rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.density-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

/* Editorial & Guides */
.editorial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 3rem;
  margin-top: 4rem;
}

.editorial-card h2 {
  font-size: 1.85rem;
  color: #fff;
  margin-bottom: 1.25rem;
}

.editorial-card h3 {
  font-size: 1.35rem;
  color: var(--accent-amber);
  margin: 2rem 0 0.75rem;
}

.editorial-card p, .editorial-card li {
  color: #cbd5e1;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.editorial-card ul, .editorial-card ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.feature-box h4 {
  color: #fff;
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 3rem 0;
  margin-top: auto;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}

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

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-amber);
}
