.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.section {
  background-color: #ffffff;
  padding: 25px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.section h2 {
  font-size: 22px;
  color: #212529;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f3f5;
}

.section h3 {
  font-size: 18px;
  color: #212529;
  margin-bottom: 12px;
}

.section p {
  margin-bottom: 12px;
  color: #495057;
}

.page-title-wrapper {
  background-color: #f8f9fa;
  padding: 20px 25px;
  margin: 0 auto;
  max-width: 1200px;
  text-align: center;
}

.page-title-wrapper h1 {
  font-size: 32px;
  color: #212529;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.page-title-wrapper p {
  font-size: 18px;
  color: #6c757d;
  margin: 0 0 12px 0;
}

.page-title-wrapper .page-subdesc {
  font-size: 14px;
  color: #495057;
  line-height: 1.6;
  margin: 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.privacy-badge {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 12px 15px;
  margin-top: 20px;
  font-size: 14px;
  color: #155724;
  font-weight: 500;
  text-align: center;
}

.privacy-badge strong {
  color: #0d47a1;
}

#textInput {
  width: 100%;
  min-height: 200px;
  padding: 15px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 10px;
  line-height: 1.6;
}

#textInput:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.char-counter {
  text-align: right;
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 15px;
}

.char-counter span {
  font-weight: 600;
  color: #212529;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #28a745;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-bar.warning {
  background-color: #ffc107;
}

.progress-bar.danger {
  background-color: #dc3545;
}

.stats-compact {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.stats-section {
  background-color: #ffffff;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stats-section h3 {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f3f5;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.stat-label {
  font-size: 13px;
  color: #495057;
}

.stat-value-highlight {
  font-size: 20px;
  font-weight: 700;
  color: #dc3545;
}

.readability-score-compact {
  text-align: center;
  margin-bottom: 10px;
}

.readability-score-compact .score-value {
  font-size: 32px;
  font-weight: 700;
  color: #007bff;
  display: block;
}

.readability-score-compact .score-label {
  font-size: 12px;
  color: #6c757d;
}

.readability-description-compact {
  font-size: 13px;
  color: #6c757d;
  text-align: center;
  font-style: italic;
}

.quick-actions-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid #f1f3f5;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-btn {
  background-color: #007bff;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn:hover:not(:disabled) {
  background-color: #0069d9;
}

.action-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.two-column-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.ngram-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.ngram-tab {
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.ngram-tab.active {
  background-color: #007bff;
  color: #ffffff;
  border-color: #007bff;
}

.frequency-hint {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 15px;
  font-style: italic;
}

.frequency-list {
  max-height: 300px;
  overflow-y: auto;
}

.frequency-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 8px;
}

.frequency-item:last-child {
  margin-bottom: 0;
}

.frequency-word {
  font-weight: 500;
  color: #212529;
}

.frequency-count {
  display: flex;
  align-items: center;
  gap: 10px;
}

.count-number {
  font-weight: 600;
  color: #007bff;
}

.count-percent {
  font-size: 13px;
  color: #6c757d;
}

.compliance-tracker {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
}

.compliance-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background-color: #ffffff;
  border-radius: 6px;
  margin-bottom: 10px;
}

.compliance-item:last-child {
  margin-bottom: 0;
}

.compliance-checkbox {
  font-weight: bold;
  color: #6c757d;
}

.compliance-label {
  flex: 1;
  font-size: 14px;
  color: #495057;
}

.compliance-status {
  font-size: 13px;
  font-weight: 500;
}

.readability-card {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 25px;
  text-align: center;
}

.readability-score {
  margin-bottom: 15px;
}

.score-value {
  font-size: 48px;
  font-weight: 700;
  color: #007bff;
  margin-bottom: 5px;
}

.score-label {
  font-size: 14px;
  color: #6c757d;
}

.readability-info {
  border-top: 1px solid #e9ecef;
  padding-top: 15px;
}

.readability-description {
  font-size: 15px;
  color: #495057;
  font-style: italic;
  margin-bottom: 8px;
}

.readability-audience {
  font-size: 14px;
  color: #28a745;
  font-weight: 500;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.feature-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 16px;
  color: #212529;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.5;
  margin: 0;
}

.metrics-list {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin: 0;
}

.metrics-list li {
  margin-bottom: 12px;
  line-height: 1.6;
  color: #495057;
}

.metrics-list li:last-child {
  margin-bottom: 0;
}

.metrics-list code {
  background-color: #e9ecef;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}

.limits-table {
  overflow-x: auto;
  margin-top: 15px;
}

.limits-table table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
}

.limits-table th,
.limits-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.limits-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.limits-table tr:hover {
  background-color: #f8f9fa;
}

.readability-levels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.readability-level {
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid;
}

.readability-level.easy {
  background-color: #d4edda;
  border-left-color: #28a745;
}

.readability-level.medium {
  background-color: #fff3cd;
  border-left-color: #ffc107;
}

.readability-level.advanced {
  background-color: #cce5ff;
  border-left-color: #007bff;
}

.readability-level.expert {
  background-color: #f8d7da;
  border-left-color: #dc3545;
}

.readability-level strong {
  font-size: 16px;
  color: #212529;
}

.readability-level span {
  font-size: 13px;
  color: #6c757d;
  margin-left: 5px;
}

.readability-level p {
  font-size: 13px;
  color: #495057;
  margin-top: 8px;
  line-height: 1.5;
}

.faq-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f3f5;
}

.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.faq-item h3 {
  font-size: 16px;
  color: #212529;
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 14px;
  color: #495057;
  line-height: 1.6;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.shortcut-item {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.shortcut-item code {
  font-family: monospace;
  font-size: 14px;
  background-color: #e9ecef;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.shortcut-or {
  font-size: 13px;
  color: #6c757d;
}

.shortcut-desc {
  font-size: 14px;
  color: #495057;
}

.related-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.related-tool-card {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  text-decoration: none;
  transition: all 0.2s;
  display: block;
}

.related-tool-card:hover {
  background-color: #e9ecef;
  border-color: #007bff;
  transform: translateY(-2px);
}

.related-tool-card h3 {
  font-size: 15px;
  color: #007bff;
  margin-bottom: 5px;
}

.related-tool-card p {
  font-size: 13px;
  color: #6c757d;
  margin: 0;
}

@media (max-width: 768px) {
  .page-title-wrapper h1 {
    font-size: 24px;
  }
  
  .page-title-wrapper p {
    font-size: 16px;
  }
  
  .privacy-badge {
    font-size: 13px;
    padding: 10px 12px;
  }
  
  .action-group {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
    justify-content: center;
  }
  
  .ngram-tabs {
    flex-wrap: wrap;
  }
  
  .ngram-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .stats-compact {
    grid-template-columns: 1fr;
  }
  
  .two-column-layout {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 15px;
  }
  
  #textInput {
    min-height: 150px;
  }
  
  .related-tools {
    grid-template-columns: 1fr;
  }
  
  .readability-levels {
    grid-template-columns: 1fr;
  }
  
  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
  
  .limits-table {
    font-size: 13px;
  }
  
  .limits-table th,
  .limits-table td {
    padding: 10px 8px;
  }
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #1a1a2e;
  color: #e0e0e0;
}

body.dark-mode .page-title-wrapper {
  background-color: #16213e;
}

body.dark-mode .page-title-wrapper h1 {
  color: #ffffff;
}

body.dark-mode .page-title-wrapper p {
  color: #b0b0b0;
}

body.dark-mode .page-title-wrapper .page-subdesc {
  color: #a0a0a0;
}

body.dark-mode .privacy-badge {
  background-color: #0d47a1;
  border-color: #1565c0;
  color: #e3f2fd;
}

body.dark-mode .privacy-badge strong {
  color: #90caf9;
}

body.dark-mode .section {
  background-color: #16213e;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

body.dark-mode .section h2 {
  color: #ffffff;
  border-bottom-color: #2d3748;
}

body.dark-mode .section h3 {
  color: #ffffff;
}

body.dark-mode .section p {
  color: #b0b0b0;
}

body.dark-mode .section ul li {
  color: #a0a0a0;
}

body.dark-mode #textInput {
  background-color: #0f0f23;
  border-color: #2d3748;
  color: #e0e0e0;
}

body.dark-mode #textInput::placeholder {
  color: #666;
}

body.dark-mode .char-counter {
  color: #888;
}

body.dark-mode .char-counter span {
  color: #e0e0e0;
}

body.dark-mode .progress-bar-container {
  background-color: #2d3748;
}

body.dark-mode .stats-compact {
  background-color: #16213e;
}

body.dark-mode .stats-section {
  background-color: #0f0f23;
}

body.dark-mode .stats-section h3 {
  color: #888;
  border-bottom-color: #2d3748;
}

body.dark-mode .stat-label {
  color: #888;
}

body.dark-mode .stat-value-highlight {
  color: #ff6b6b;
}

body.dark-mode .readability-score-compact .score-value {
  color: #42a5f5;
}

body.dark-mode .readability-score-compact .score-label {
  color: #888;
}

body.dark-mode .readability-description-compact {
  color: #888;
}

body.dark-mode .action-btn {
  background-color: #1e88e5;
}

body.dark-mode .action-btn:hover:not(:disabled) {
  background-color: #1565c0;
}

body.dark-mode .ngram-tab {
  background-color: #0f0f23;
  border-color: #2d3748;
  color: #b0b0b0;
}

body.dark-mode .ngram-tab.active {
  background-color: #1e88e5;
  border-color: #1e88e5;
  color: #ffffff;
}

body.dark-mode .frequency-hint {
  color: #888;
}

body.dark-mode .frequency-item {
  background-color: #0f0f23;
}

body.dark-mode .frequency-word {
  color: #e0e0e0;
}

body.dark-mode .compliance-tracker {
  background-color: #0f0f23;
}

body.dark-mode .compliance-item {
  background-color: #16213e;
}

body.dark-mode .compliance-label {
  color: #b0b0b0;
}

body.dark-mode .readability-card {
  background-color: #16213e;
}

body.dark-mode .score-value {
  color: #42a5f5;
}

body.dark-mode .score-label {
  color: #888;
}

body.dark-mode .readability-description {
  color: #a0a0a0;
}

body.dark-mode .readability-audience {
  color: #66bb6a;
}

body.dark-mode .feature-card {
  background-color: #16213e;
}

body.dark-mode .feature-card h3 {
  color: #ffffff;
}

body.dark-mode .feature-card p {
  color: #888;
}

body.dark-mode .metrics-list {
  background-color: #0f0f23;
}

body.dark-mode .metrics-list li {
  color: #a0a0a0;
}

body.dark-mode .metrics-list code {
  background-color: #2d3748;
}

body.dark-mode .limits-table th {
  background-color: #0f0f23;
  color: #888;
}

body.dark-mode .limits-table td {
  border-bottom-color: #2d3748;
}

body.dark-mode .limits-table tr:hover {
  background-color: #0f0f23;
}

body.dark-mode .readability-level.easy {
  background-color: #1b3a1b;
}

body.dark-mode .readability-level.medium {
  background-color: #3a331b;
}

body.dark-mode .readability-level.advanced {
  background-color: #1b2a3a;
}

body.dark-mode .readability-level.expert {
  background-color: #3a1b1b;
}

body.dark-mode .readability-level strong {
  color: #e0e0e0;
}

body.dark-mode .readability-level span {
  color: #888;
}

body.dark-mode .readability-level p {
  color: #a0a0a0;
}

body.dark-mode .faq-item {
  border-bottom-color: #2d3748;
}

body.dark-mode .faq-item h3 {
  color: #e0e0e0;
}

body.dark-mode .faq-item p {
  color: #a0a0a0;
}

body.dark-mode .shortcut-item {
  background-color: #0f0f23;
}

body.dark-mode .shortcut-item code {
  background-color: #2d3748;
}

body.dark-mode .shortcut-desc {
  color: #a0a0a0;
}

body.dark-mode .related-tool-card {
  background-color: #0f0f23;
  border-color: #2d3748;
}

body.dark-mode .related-tool-card:hover {
  background-color: #16213e;
  border-color: #1e88e5;
}

body.dark-mode .related-tool-card h3 {
  color: #42a5f5;
}

body.dark-mode .related-tool-card p {
  color: #888;
}