/* 글자 수 세기 전용 스타일 */

/* 통계 카드 그리드 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: var(--primary);
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-top: 0.25rem;
}

/* 옵션 행 */
.options-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.option-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-sub);
  cursor: pointer;
  user-select: none;
}

.option-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* 버튼 그룹 */
.btn-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* 텍스트 에디터 */
.editor-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-sub);
}

#editor {
  width: 100%;
  min-height: 300px;
  padding: 1rem;
  border: none;
  outline: none;
  resize: vertical;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.8;
  background: var(--surface);
  color: var(--text);
}

#editor::placeholder {
  color: var(--text-sub);
  opacity: 0.6;
}

/* 상세 통계 */
.detail-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.6rem 1rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-sub);
}

.detail-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.detail-stat .detail-value {
  font-weight: 600;
  color: var(--text);
}

/* 반응형: 태블릿 */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 반응형: 모바일 */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.75rem 0.5rem;
  }

  .stat-card .stat-value {
    font-size: 1.35rem;
  }

  .stat-card .stat-label {
    font-size: 0.72rem;
  }

  .btn-group {
    gap: 0.4rem;
  }

  .btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.8rem;
  }

  #editor {
    min-height: 200px;
    font-size: 0.88rem;
  }

  .detail-stats {
    gap: 0.75rem;
    font-size: 0.75rem;
  }
}
