/* ===================================
   Tool: char-counter
   =================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
  }
  @media (max-width: 768px) {
    .stats-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    text-align: center;
  }
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: var(--space-xs);
  }
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
  }
  
.input-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-xl);
  }
  
.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
  }
.input-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }
  
.text-input {
    width: 100%;
    min-height: 200px;
    padding: var(--space-lg);
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    resize: vertical;
    transition: all var(--transition-fast);
  }
.text-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
  }
.text-input::placeholder {
    color: var(--brown-300);
  }
  
.goal-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
  }
.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
  }
.goal-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }
.goal-input-row {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-md);
  }
.goal-input {
    width: 120px;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-main);
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
  }
.goal-input:focus {
    outline: none;
    border-color: var(--accent);
  }
.goal-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
  }
.goal-progress {
    height: 8px;
    background: var(--brown-100);
    border-radius: 4px;
    overflow: hidden;
  }
.goal-progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width var(--transition-normal);
  }
.goal-progress-bar.complete {
    background: #4caf50;
  }
.goal-status {
    margin-top: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
  }
  
.analysis-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
  }
.analysis-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
  }
.analysis-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
  }
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  @media (max-width: 600px) {
    .analysis-grid {
      grid-template-columns: 1fr;
    }
  }
.analysis-item {
    background: var(--brown-50);
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }
.analysis-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
  }
.analysis-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  /* Usage Section */
.usage-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xl);
  }
.usage-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
  }
.usage-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
  }
.usage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  @media (max-width: 600px) {
    .usage-grid {
      grid-template-columns: 1fr;
    }
  }
.usage-item {
    background: var(--bg-card);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
.usage-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
.usage-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
  }
.usage-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
  }
.usage-desc ul {
    margin: var(--space-xs) 0 0 0;
    padding-left: var(--space-lg);
  }
.usage-desc li {
    margin-bottom: var(--space-xs);
  }

  /* Trivia Section */
.trivia-section {
    background: linear-gradient(135deg, var(--brown-50) 0%, var(--bg-card) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
  }
.trivia-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
  }
.trivia-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
  }
.trivia-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  @media (max-width: 600px) {
    .trivia-grid {
      grid-template-columns: 1fr;
    }
  }
.trivia-item {
    background: var(--bg-primary);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }
.trivia-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
  }
.trivia-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
  }

.history-section {
    margin-top: var(--space-xl);
  }
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
  }
.history-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }
.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }
.history-item {
    background: var(--bg-card);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-fast);
  }
.history-item:hover {
    background: var(--accent-light);
  }
.history-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: var(--space-md);
    color: var(--text-primary);
  }
.history-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
  }
.history-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
  }


